node_modules ignore

This commit is contained in:
2025-05-08 23:43:47 +02:00
parent e19d52f172
commit 4574544c9f
65041 changed files with 10593536 additions and 0 deletions

View File

@@ -0,0 +1,4 @@
import type { CLIContext } from '../types';
declare const _default: (ctx: CLIContext) => Promise<void>;
export default _default;
//# sourceMappingURL=action.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"action.d.ts","sourceRoot":"","sources":["../../src/logout/action.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;8BAMhB,UAAU;AAArC,wBAsCE"}

View File

@@ -0,0 +1,46 @@
'use strict';
var cliApi = require('../services/cli-api.js');
require('fs-extra');
require('path');
require('lodash');
var token = require('../services/token.js');
require('chalk');
require('fast-safe-stringify');
require('ora');
require('cli-progress');
var analytics = require('../utils/analytics.js');
const openModule = import('open');
var action = (async (ctx)=>{
const { logger } = ctx;
const { retrieveToken, eraseToken } = await token.tokenServiceFactory(ctx);
const token$1 = await retrieveToken();
if (!token$1) {
logger.log("You're already logged out.");
return;
}
const cloudApiService = await cliApi.cloudApiFactory(ctx, token$1);
const config = await cloudApiService.config();
const cliConfig = config.data;
try {
await eraseToken();
openModule.then((open)=>{
open.default(`${cliConfig.baseUrl}/oidc/logout?client_id=${encodeURIComponent(cliConfig.clientId)}&logout_hint=${encodeURIComponent(token$1)}
`).catch((e)=>{
// Failing to open the logout URL is not a critical error, so we just log it
logger.debug(e.message, e);
});
});
logger.log('🔌 You have been logged out from the CLI. If you are on a shared computer, please make sure to log out from the Strapi Cloud Dashboard as well.');
} catch (e) {
logger.error('🥲 Oops! Something went wrong while logging you out. Please try again.');
logger.debug(e);
}
await analytics.trackEvent(ctx, cloudApiService, 'didLogout', {
loginMethod: 'cli'
});
});
module.exports = action;
//# sourceMappingURL=action.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"action.js","sources":["../../src/logout/action.ts"],"sourcesContent":["import type { CLIContext } from '../types';\nimport { tokenServiceFactory, cloudApiFactory } from '../services';\nimport { trackEvent } from '../utils/analytics';\n\nconst openModule = import('open');\n\nexport default async (ctx: CLIContext) => {\n const { logger } = ctx;\n const { retrieveToken, eraseToken } = await tokenServiceFactory(ctx);\n\n const token = await retrieveToken();\n if (!token) {\n logger.log(\"You're already logged out.\");\n return;\n }\n const cloudApiService = await cloudApiFactory(ctx, token);\n const config = await cloudApiService.config();\n const cliConfig = config.data;\n\n try {\n await eraseToken();\n\n openModule.then((open) => {\n open\n .default(\n `${cliConfig.baseUrl}/oidc/logout?client_id=${encodeURIComponent(\n cliConfig.clientId\n )}&logout_hint=${encodeURIComponent(token)}\n `\n )\n .catch((e: Error) => {\n // Failing to open the logout URL is not a critical error, so we just log it\n logger.debug(e.message, e);\n });\n });\n\n logger.log(\n '🔌 You have been logged out from the CLI. If you are on a shared computer, please make sure to log out from the Strapi Cloud Dashboard as well.'\n );\n } catch (e) {\n logger.error('🥲 Oops! Something went wrong while logging you out. Please try again.');\n logger.debug(e);\n }\n await trackEvent(ctx, cloudApiService, 'didLogout', { loginMethod: 'cli' });\n};\n"],"names":["openModule","ctx","logger","retrieveToken","eraseToken","tokenServiceFactory","token","log","cloudApiService","cloudApiFactory","config","cliConfig","data","then","open","default","baseUrl","encodeURIComponent","clientId","catch","e","debug","message","error","trackEvent","loginMethod"],"mappings":";;;;;;;;;;;;;AAIA,MAAMA,UAAAA,GAAa,OAAO,MAAA,CAAA;AAE1B,aAAe,CAAA,OAAOC,GAAAA,GAAAA;IACpB,MAAM,EAAEC,MAAM,EAAE,GAAGD,GAAAA;AACnB,IAAA,MAAM,EAAEE,aAAa,EAAEC,UAAU,EAAE,GAAG,MAAMC,yBAAoBJ,CAAAA,GAAAA,CAAAA;AAEhE,IAAA,MAAMK,UAAQ,MAAMH,aAAAA,EAAAA;AACpB,IAAA,IAAI,CAACG,OAAO,EAAA;AACVJ,QAAAA,MAAAA,CAAOK,GAAG,CAAC,4BAAA,CAAA;AACX,QAAA;AACF;IACA,MAAMC,eAAAA,GAAkB,MAAMC,sBAAAA,CAAgBR,GAAKK,EAAAA,OAAAA,CAAAA;IACnD,MAAMI,MAAAA,GAAS,MAAMF,eAAAA,CAAgBE,MAAM,EAAA;IAC3C,MAAMC,SAAAA,GAAYD,OAAOE,IAAI;IAE7B,IAAI;QACF,MAAMR,UAAAA,EAAAA;QAENJ,UAAWa,CAAAA,IAAI,CAAC,CAACC,IAAAA,GAAAA;AACfA,YAAAA,IAAAA,CACGC,OAAO,CACN,CAAC,EAAEJ,SAAAA,CAAUK,OAAO,CAAC,uBAAuB,EAAEC,kBAAAA,CAC5CN,UAAUO,QAAQ,CAAA,CAClB,aAAa,EAAED,mBAAmBX,OAAO,CAAA;UAC3C,CAAC,CAAA,CAEFa,KAAK,CAAC,CAACC,CAAAA,GAAAA;;AAENlB,gBAAAA,MAAAA,CAAOmB,KAAK,CAACD,CAAEE,CAAAA,OAAO,EAAEF,CAAAA,CAAAA;AAC1B,aAAA,CAAA;AACJ,SAAA,CAAA;AAEAlB,QAAAA,MAAAA,CAAOK,GAAG,CACR,iJAAA,CAAA;AAEJ,KAAA,CAAE,OAAOa,CAAG,EAAA;AACVlB,QAAAA,MAAAA,CAAOqB,KAAK,CAAC,wEAAA,CAAA;AACbrB,QAAAA,MAAAA,CAAOmB,KAAK,CAACD,CAAAA,CAAAA;AACf;IACA,MAAMI,oBAAAA,CAAWvB,GAAKO,EAAAA,eAAAA,EAAiB,WAAa,EAAA;QAAEiB,WAAa,EAAA;AAAM,KAAA,CAAA;AAC3E,CAAA;;;;"}

View File

@@ -0,0 +1,44 @@
import { cloudApiFactory } from '../services/cli-api.mjs';
import 'fs-extra';
import 'path';
import 'lodash';
import { tokenServiceFactory } from '../services/token.mjs';
import 'chalk';
import 'fast-safe-stringify';
import 'ora';
import 'cli-progress';
import { trackEvent } from '../utils/analytics.mjs';
const openModule = import('open');
var action = (async (ctx)=>{
const { logger } = ctx;
const { retrieveToken, eraseToken } = await tokenServiceFactory(ctx);
const token = await retrieveToken();
if (!token) {
logger.log("You're already logged out.");
return;
}
const cloudApiService = await cloudApiFactory(ctx, token);
const config = await cloudApiService.config();
const cliConfig = config.data;
try {
await eraseToken();
openModule.then((open)=>{
open.default(`${cliConfig.baseUrl}/oidc/logout?client_id=${encodeURIComponent(cliConfig.clientId)}&logout_hint=${encodeURIComponent(token)}
`).catch((e)=>{
// Failing to open the logout URL is not a critical error, so we just log it
logger.debug(e.message, e);
});
});
logger.log('🔌 You have been logged out from the CLI. If you are on a shared computer, please make sure to log out from the Strapi Cloud Dashboard as well.');
} catch (e) {
logger.error('🥲 Oops! Something went wrong while logging you out. Please try again.');
logger.debug(e);
}
await trackEvent(ctx, cloudApiService, 'didLogout', {
loginMethod: 'cli'
});
});
export { action as default };
//# sourceMappingURL=action.mjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"action.mjs","sources":["../../src/logout/action.ts"],"sourcesContent":["import type { CLIContext } from '../types';\nimport { tokenServiceFactory, cloudApiFactory } from '../services';\nimport { trackEvent } from '../utils/analytics';\n\nconst openModule = import('open');\n\nexport default async (ctx: CLIContext) => {\n const { logger } = ctx;\n const { retrieveToken, eraseToken } = await tokenServiceFactory(ctx);\n\n const token = await retrieveToken();\n if (!token) {\n logger.log(\"You're already logged out.\");\n return;\n }\n const cloudApiService = await cloudApiFactory(ctx, token);\n const config = await cloudApiService.config();\n const cliConfig = config.data;\n\n try {\n await eraseToken();\n\n openModule.then((open) => {\n open\n .default(\n `${cliConfig.baseUrl}/oidc/logout?client_id=${encodeURIComponent(\n cliConfig.clientId\n )}&logout_hint=${encodeURIComponent(token)}\n `\n )\n .catch((e: Error) => {\n // Failing to open the logout URL is not a critical error, so we just log it\n logger.debug(e.message, e);\n });\n });\n\n logger.log(\n '🔌 You have been logged out from the CLI. If you are on a shared computer, please make sure to log out from the Strapi Cloud Dashboard as well.'\n );\n } catch (e) {\n logger.error('🥲 Oops! Something went wrong while logging you out. Please try again.');\n logger.debug(e);\n }\n await trackEvent(ctx, cloudApiService, 'didLogout', { loginMethod: 'cli' });\n};\n"],"names":["openModule","ctx","logger","retrieveToken","eraseToken","tokenServiceFactory","token","log","cloudApiService","cloudApiFactory","config","cliConfig","data","then","open","default","baseUrl","encodeURIComponent","clientId","catch","e","debug","message","error","trackEvent","loginMethod"],"mappings":";;;;;;;;;;;AAIA,MAAMA,UAAAA,GAAa,OAAO,MAAA,CAAA;AAE1B,aAAe,CAAA,OAAOC,GAAAA,GAAAA;IACpB,MAAM,EAAEC,MAAM,EAAE,GAAGD,GAAAA;AACnB,IAAA,MAAM,EAAEE,aAAa,EAAEC,UAAU,EAAE,GAAG,MAAMC,mBAAoBJ,CAAAA,GAAAA,CAAAA;AAEhE,IAAA,MAAMK,QAAQ,MAAMH,aAAAA,EAAAA;AACpB,IAAA,IAAI,CAACG,KAAO,EAAA;AACVJ,QAAAA,MAAAA,CAAOK,GAAG,CAAC,4BAAA,CAAA;AACX,QAAA;AACF;IACA,MAAMC,eAAAA,GAAkB,MAAMC,eAAAA,CAAgBR,GAAKK,EAAAA,KAAAA,CAAAA;IACnD,MAAMI,MAAAA,GAAS,MAAMF,eAAAA,CAAgBE,MAAM,EAAA;IAC3C,MAAMC,SAAAA,GAAYD,OAAOE,IAAI;IAE7B,IAAI;QACF,MAAMR,UAAAA,EAAAA;QAENJ,UAAWa,CAAAA,IAAI,CAAC,CAACC,IAAAA,GAAAA;AACfA,YAAAA,IAAAA,CACGC,OAAO,CACN,CAAC,EAAEJ,SAAAA,CAAUK,OAAO,CAAC,uBAAuB,EAAEC,kBAAAA,CAC5CN,UAAUO,QAAQ,CAAA,CAClB,aAAa,EAAED,mBAAmBX,KAAO,CAAA;UAC3C,CAAC,CAAA,CAEFa,KAAK,CAAC,CAACC,CAAAA,GAAAA;;AAENlB,gBAAAA,MAAAA,CAAOmB,KAAK,CAACD,CAAEE,CAAAA,OAAO,EAAEF,CAAAA,CAAAA;AAC1B,aAAA,CAAA;AACJ,SAAA,CAAA;AAEAlB,QAAAA,MAAAA,CAAOK,GAAG,CACR,iJAAA,CAAA;AAEJ,KAAA,CAAE,OAAOa,CAAG,EAAA;AACVlB,QAAAA,MAAAA,CAAOqB,KAAK,CAAC,wEAAA,CAAA;AACbrB,QAAAA,MAAAA,CAAOmB,KAAK,CAACD,CAAAA,CAAAA;AACf;IACA,MAAMI,UAAAA,CAAWvB,GAAKO,EAAAA,eAAAA,EAAiB,WAAa,EAAA;QAAEiB,WAAa,EAAA;AAAM,KAAA,CAAA;AAC3E,CAAA;;;;"}

View File

@@ -0,0 +1,7 @@
import type { StrapiCloudCommand } from '../types';
/**
* `$ cloud device flow logout`
*/
declare const command: StrapiCloudCommand;
export default command;
//# sourceMappingURL=command.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../src/logout/command.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAInD;;GAEG;AACH,QAAA,MAAM,OAAO,EAAE,kBAOd,CAAC;AAEF,eAAe,OAAO,CAAC"}

View File

@@ -0,0 +1,14 @@
'use strict';
var commander = require('commander');
var helpers = require('../utils/helpers.js');
var action = require('./action.js');
/**
* `$ cloud device flow logout`
*/ const command = ({ ctx })=>{
return commander.createCommand('cloud:logout').alias('logout').description('Strapi Cloud Logout').option('-d, --debug', 'Enable debugging mode with verbose logs').option('-s, --silent', "Don't log anything").action(()=>helpers.runAction('logout', action)(ctx));
};
module.exports = command;
//# sourceMappingURL=command.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"command.js","sources":["../../src/logout/command.ts"],"sourcesContent":["import { createCommand } from 'commander';\nimport type { StrapiCloudCommand } from '../types';\nimport { runAction } from '../utils/helpers';\nimport action from './action';\n\n/**\n * `$ cloud device flow logout`\n */\nconst command: StrapiCloudCommand = ({ ctx }) => {\n return createCommand('cloud:logout')\n .alias('logout')\n .description('Strapi Cloud Logout')\n .option('-d, --debug', 'Enable debugging mode with verbose logs')\n .option('-s, --silent', \"Don't log anything\")\n .action(() => runAction('logout', action)(ctx));\n};\n\nexport default command;\n"],"names":["command","ctx","createCommand","alias","description","option","action","runAction"],"mappings":";;;;;;AAKA;;AAEC,IACKA,MAAAA,OAAAA,GAA8B,CAAC,EAAEC,GAAG,EAAE,GAAA;IAC1C,OAAOC,uBAAAA,CAAc,gBAClBC,KAAK,CAAC,UACNC,WAAW,CAAC,uBACZC,MAAM,CAAC,eAAe,yCACtBA,CAAAA,CAAAA,MAAM,CAAC,cAAgB,EAAA,oBAAA,CAAA,CACvBC,MAAM,CAAC,IAAMC,iBAAU,CAAA,QAAA,EAAUD,MAAQL,CAAAA,CAAAA,GAAAA,CAAAA,CAAAA;AAC9C;;;;"}

View File

@@ -0,0 +1,12 @@
import { createCommand } from 'commander';
import { runAction } from '../utils/helpers.mjs';
import action from './action.mjs';
/**
* `$ cloud device flow logout`
*/ const command = ({ ctx })=>{
return createCommand('cloud:logout').alias('logout').description('Strapi Cloud Logout').option('-d, --debug', 'Enable debugging mode with verbose logs').option('-s, --silent', "Don't log anything").action(()=>runAction('logout', action)(ctx));
};
export { command as default };
//# sourceMappingURL=command.mjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"command.mjs","sources":["../../src/logout/command.ts"],"sourcesContent":["import { createCommand } from 'commander';\nimport type { StrapiCloudCommand } from '../types';\nimport { runAction } from '../utils/helpers';\nimport action from './action';\n\n/**\n * `$ cloud device flow logout`\n */\nconst command: StrapiCloudCommand = ({ ctx }) => {\n return createCommand('cloud:logout')\n .alias('logout')\n .description('Strapi Cloud Logout')\n .option('-d, --debug', 'Enable debugging mode with verbose logs')\n .option('-s, --silent', \"Don't log anything\")\n .action(() => runAction('logout', action)(ctx));\n};\n\nexport default command;\n"],"names":["command","ctx","createCommand","alias","description","option","action","runAction"],"mappings":";;;;AAKA;;AAEC,IACKA,MAAAA,OAAAA,GAA8B,CAAC,EAAEC,GAAG,EAAE,GAAA;IAC1C,OAAOC,aAAAA,CAAc,gBAClBC,KAAK,CAAC,UACNC,WAAW,CAAC,uBACZC,MAAM,CAAC,eAAe,yCACtBA,CAAAA,CAAAA,MAAM,CAAC,cAAgB,EAAA,oBAAA,CAAA,CACvBC,MAAM,CAAC,IAAMC,SAAU,CAAA,QAAA,EAAUD,MAAQL,CAAAA,CAAAA,GAAAA,CAAAA,CAAAA;AAC9C;;;;"}

View File

@@ -0,0 +1,11 @@
import action from './action';
import command from './command';
export { action, command };
declare const _default: {
name: string;
description: string;
action: (ctx: import("..").CLIContext) => Promise<void>;
command: import("..").StrapiCloudCommand;
};
export default _default;
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/logout/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,OAAO,MAAM,WAAW,CAAC;AAEhC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC;;;;;;;AAE3B,wBAKE"}

View File

@@ -0,0 +1,18 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var action = require('./action.js');
var command = require('./command.js');
var logout = {
name: 'logout',
description: 'Strapi Cloud Logout',
action,
command
};
exports.action = action;
exports.command = command;
exports.default = logout;
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sources":["../../src/logout/index.ts"],"sourcesContent":["import action from './action';\nimport command from './command';\n\nexport { action, command };\n\nexport default {\n name: 'logout',\n description: 'Strapi Cloud Logout',\n action,\n command,\n};\n"],"names":["name","description","action","command"],"mappings":";;;;;;;AAKA,aAAe;IACbA,IAAM,EAAA,QAAA;IACNC,WAAa,EAAA,qBAAA;AACbC,IAAAA,MAAAA;AACAC,IAAAA;AACF,CAAE;;;;;;"}

View File

@@ -0,0 +1,12 @@
import action from './action.mjs';
import command from './command.mjs';
var logout = {
name: 'logout',
description: 'Strapi Cloud Logout',
action,
command
};
export { action, command, logout as default };
//# sourceMappingURL=index.mjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.mjs","sources":["../../src/logout/index.ts"],"sourcesContent":["import action from './action';\nimport command from './command';\n\nexport { action, command };\n\nexport default {\n name: 'logout',\n description: 'Strapi Cloud Logout',\n action,\n command,\n};\n"],"names":["name","description","action","command"],"mappings":";;;AAKA,aAAe;IACbA,IAAM,EAAA,QAAA;IACNC,WAAa,EAAA,qBAAA;AACbC,IAAAA,MAAAA;AACAC,IAAAA;AACF,CAAE;;;;"}