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,5 @@
export declare const apiConfig: {
apiBaseUrl: string | undefined;
dashboardBaseUrl: string | undefined;
};
//# sourceMappingURL=api.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/config/api.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS;;;CAGrB,CAAC"}

View File

@@ -0,0 +1,11 @@
'use strict';
var utils = require('@strapi/utils');
const apiConfig = {
apiBaseUrl: utils.env('STRAPI_CLI_CLOUD_API', 'https://cloud-cli-api.strapi.io'),
dashboardBaseUrl: utils.env('STRAPI_CLI_CLOUD_DASHBOARD', 'https://cloud.strapi.io')
};
exports.apiConfig = apiConfig;
//# sourceMappingURL=api.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"api.js","sources":["../../src/config/api.ts"],"sourcesContent":["import { env } from '@strapi/utils';\n\nexport const apiConfig = {\n apiBaseUrl: env('STRAPI_CLI_CLOUD_API', 'https://cloud-cli-api.strapi.io'),\n dashboardBaseUrl: env('STRAPI_CLI_CLOUD_DASHBOARD', 'https://cloud.strapi.io'),\n};\n"],"names":["apiConfig","apiBaseUrl","env","dashboardBaseUrl"],"mappings":";;;;MAEaA,SAAY,GAAA;AACvBC,IAAAA,UAAAA,EAAYC,UAAI,sBAAwB,EAAA,iCAAA,CAAA;AACxCC,IAAAA,gBAAAA,EAAkBD,UAAI,4BAA8B,EAAA,yBAAA;AACtD;;;;"}

View File

@@ -0,0 +1,9 @@
import { env } from '@strapi/utils';
const apiConfig = {
apiBaseUrl: env('STRAPI_CLI_CLOUD_API', 'https://cloud-cli-api.strapi.io'),
dashboardBaseUrl: env('STRAPI_CLI_CLOUD_DASHBOARD', 'https://cloud.strapi.io')
};
export { apiConfig };
//# sourceMappingURL=api.mjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"api.mjs","sources":["../../src/config/api.ts"],"sourcesContent":["import { env } from '@strapi/utils';\n\nexport const apiConfig = {\n apiBaseUrl: env('STRAPI_CLI_CLOUD_API', 'https://cloud-cli-api.strapi.io'),\n dashboardBaseUrl: env('STRAPI_CLI_CLOUD_DASHBOARD', 'https://cloud.strapi.io'),\n};\n"],"names":["apiConfig","apiBaseUrl","env","dashboardBaseUrl"],"mappings":";;MAEaA,SAAY,GAAA;AACvBC,IAAAA,UAAAA,EAAYC,IAAI,sBAAwB,EAAA,iCAAA,CAAA;AACxCC,IAAAA,gBAAAA,EAAkBD,IAAI,4BAA8B,EAAA,yBAAA;AACtD;;;;"}

View File

@@ -0,0 +1,9 @@
export declare const CONFIG_FILENAME = "config.json";
export type LocalConfig = {
token?: string;
installId?: string;
};
export declare function getTmpStoragePath(): Promise<string>;
export declare function getLocalConfig(): Promise<LocalConfig>;
export declare function saveLocalConfig(data: LocalConfig): Promise<void>;
//# sourceMappingURL=local.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"local.d.ts","sourceRoot":"","sources":["../../src/config/local.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,eAAe,gBAAgB,CAAC;AAE7C,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAYF,wBAAsB,iBAAiB,oBAItC;AAaD,wBAAsB,cAAc,IAAI,OAAO,CAAC,WAAW,CAAC,CAS3D;AAED,wBAAsB,eAAe,CAAC,IAAI,EAAE,WAAW,iBAItD"}

View File

@@ -0,0 +1,60 @@
'use strict';
var path = require('path');
var os = require('os');
var fse = require('fs-extra');
var XDGAppPaths = require('xdg-app-paths');
const APP_FOLDER_NAME = 'com.strapi.cli';
const CONFIG_FILENAME = 'config.json';
async function checkDirectoryExists(directoryPath) {
try {
const fsStat = await fse.lstat(directoryPath);
return fsStat.isDirectory();
} catch (e) {
return false;
}
}
// Determine storage path based on the operating system
async function getTmpStoragePath() {
const storagePath = path.join(os.tmpdir(), APP_FOLDER_NAME);
await fse.ensureDir(storagePath);
return storagePath;
}
async function getConfigPath() {
const configDirs = XDGAppPaths(APP_FOLDER_NAME).configDirs();
const configPath = configDirs.find(checkDirectoryExists);
if (!configPath) {
await fse.ensureDir(configDirs[0]);
return configDirs[0];
}
return configPath;
}
async function getLocalConfig() {
const configPath = await getConfigPath();
const configFilePath = path.join(configPath, CONFIG_FILENAME);
await fse.ensureFile(configFilePath);
try {
return await fse.readJSON(configFilePath, {
encoding: 'utf8',
throws: true
});
} catch (e) {
return {};
}
}
async function saveLocalConfig(data) {
const configPath = await getConfigPath();
const configFilePath = path.join(configPath, CONFIG_FILENAME);
await fse.writeJson(configFilePath, data, {
encoding: 'utf8',
spaces: 2,
mode: 0o600
});
}
exports.CONFIG_FILENAME = CONFIG_FILENAME;
exports.getLocalConfig = getLocalConfig;
exports.getTmpStoragePath = getTmpStoragePath;
exports.saveLocalConfig = saveLocalConfig;
//# sourceMappingURL=local.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"local.js","sources":["../../src/config/local.ts"],"sourcesContent":["import path from 'path';\nimport os from 'os';\nimport fse from 'fs-extra';\nimport XDGAppPaths from 'xdg-app-paths';\n\nconst APP_FOLDER_NAME = 'com.strapi.cli';\n\nexport const CONFIG_FILENAME = 'config.json';\n\nexport type LocalConfig = {\n token?: string;\n installId?: string;\n};\n\nasync function checkDirectoryExists(directoryPath: string) {\n try {\n const fsStat = await fse.lstat(directoryPath);\n return fsStat.isDirectory();\n } catch (e) {\n return false;\n }\n}\n\n// Determine storage path based on the operating system\nexport async function getTmpStoragePath() {\n const storagePath = path.join(os.tmpdir(), APP_FOLDER_NAME);\n await fse.ensureDir(storagePath);\n return storagePath;\n}\n\nasync function getConfigPath() {\n const configDirs = XDGAppPaths(APP_FOLDER_NAME).configDirs();\n const configPath = configDirs.find(checkDirectoryExists);\n\n if (!configPath) {\n await fse.ensureDir(configDirs[0]);\n return configDirs[0];\n }\n return configPath;\n}\n\nexport async function getLocalConfig(): Promise<LocalConfig> {\n const configPath = await getConfigPath();\n const configFilePath = path.join(configPath, CONFIG_FILENAME);\n await fse.ensureFile(configFilePath);\n try {\n return await fse.readJSON(configFilePath, { encoding: 'utf8', throws: true });\n } catch (e) {\n return {};\n }\n}\n\nexport async function saveLocalConfig(data: LocalConfig) {\n const configPath = await getConfigPath();\n const configFilePath = path.join(configPath, CONFIG_FILENAME);\n await fse.writeJson(configFilePath, data, { encoding: 'utf8', spaces: 2, mode: 0o600 });\n}\n"],"names":["APP_FOLDER_NAME","CONFIG_FILENAME","checkDirectoryExists","directoryPath","fsStat","fse","lstat","isDirectory","e","getTmpStoragePath","storagePath","path","join","os","tmpdir","ensureDir","getConfigPath","configDirs","XDGAppPaths","configPath","find","getLocalConfig","configFilePath","ensureFile","readJSON","encoding","throws","saveLocalConfig","data","writeJson","spaces","mode"],"mappings":";;;;;;;AAKA,MAAMA,eAAkB,GAAA,gBAAA;AAEjB,MAAMC,kBAAkB;AAO/B,eAAeC,qBAAqBC,aAAqB,EAAA;IACvD,IAAI;AACF,QAAA,MAAMC,MAAS,GAAA,MAAMC,GAAIC,CAAAA,KAAK,CAACH,aAAAA,CAAAA;AAC/B,QAAA,OAAOC,OAAOG,WAAW,EAAA;AAC3B,KAAA,CAAE,OAAOC,CAAG,EAAA;QACV,OAAO,KAAA;AACT;AACF;AAEA;AACO,eAAeC,iBAAAA,GAAAA;AACpB,IAAA,MAAMC,cAAcC,IAAKC,CAAAA,IAAI,CAACC,EAAAA,CAAGC,MAAM,EAAId,EAAAA,eAAAA,CAAAA;IAC3C,MAAMK,GAAAA,CAAIU,SAAS,CAACL,WAAAA,CAAAA;IACpB,OAAOA,WAAAA;AACT;AAEA,eAAeM,aAAAA,GAAAA;IACb,MAAMC,UAAAA,GAAaC,WAAYlB,CAAAA,eAAAA,CAAAA,CAAiBiB,UAAU,EAAA;IAC1D,MAAME,UAAAA,GAAaF,UAAWG,CAAAA,IAAI,CAAClB,oBAAAA,CAAAA;AAEnC,IAAA,IAAI,CAACiB,UAAY,EAAA;AACf,QAAA,MAAMd,GAAIU,CAAAA,SAAS,CAACE,UAAU,CAAC,CAAE,CAAA,CAAA;QACjC,OAAOA,UAAU,CAAC,CAAE,CAAA;AACtB;IACA,OAAOE,UAAAA;AACT;AAEO,eAAeE,cAAAA,GAAAA;AACpB,IAAA,MAAMF,aAAa,MAAMH,aAAAA,EAAAA;AACzB,IAAA,MAAMM,cAAiBX,GAAAA,IAAAA,CAAKC,IAAI,CAACO,UAAYlB,EAAAA,eAAAA,CAAAA;IAC7C,MAAMI,GAAAA,CAAIkB,UAAU,CAACD,cAAAA,CAAAA;IACrB,IAAI;AACF,QAAA,OAAO,MAAMjB,GAAAA,CAAImB,QAAQ,CAACF,cAAgB,EAAA;YAAEG,QAAU,EAAA,MAAA;YAAQC,MAAQ,EAAA;AAAK,SAAA,CAAA;AAC7E,KAAA,CAAE,OAAOlB,CAAG,EAAA;AACV,QAAA,OAAO,EAAC;AACV;AACF;AAEO,eAAemB,gBAAgBC,IAAiB,EAAA;AACrD,IAAA,MAAMT,aAAa,MAAMH,aAAAA,EAAAA;AACzB,IAAA,MAAMM,cAAiBX,GAAAA,IAAAA,CAAKC,IAAI,CAACO,UAAYlB,EAAAA,eAAAA,CAAAA;AAC7C,IAAA,MAAMI,GAAIwB,CAAAA,SAAS,CAACP,cAAAA,EAAgBM,IAAM,EAAA;QAAEH,QAAU,EAAA,MAAA;QAAQK,MAAQ,EAAA,CAAA;QAAGC,IAAM,EAAA;AAAM,KAAA,CAAA;AACvF;;;;;;;"}

View File

@@ -0,0 +1,55 @@
import path__default from 'path';
import os from 'os';
import fse__default from 'fs-extra';
import XDGAppPaths from 'xdg-app-paths';
const APP_FOLDER_NAME = 'com.strapi.cli';
const CONFIG_FILENAME = 'config.json';
async function checkDirectoryExists(directoryPath) {
try {
const fsStat = await fse__default.lstat(directoryPath);
return fsStat.isDirectory();
} catch (e) {
return false;
}
}
// Determine storage path based on the operating system
async function getTmpStoragePath() {
const storagePath = path__default.join(os.tmpdir(), APP_FOLDER_NAME);
await fse__default.ensureDir(storagePath);
return storagePath;
}
async function getConfigPath() {
const configDirs = XDGAppPaths(APP_FOLDER_NAME).configDirs();
const configPath = configDirs.find(checkDirectoryExists);
if (!configPath) {
await fse__default.ensureDir(configDirs[0]);
return configDirs[0];
}
return configPath;
}
async function getLocalConfig() {
const configPath = await getConfigPath();
const configFilePath = path__default.join(configPath, CONFIG_FILENAME);
await fse__default.ensureFile(configFilePath);
try {
return await fse__default.readJSON(configFilePath, {
encoding: 'utf8',
throws: true
});
} catch (e) {
return {};
}
}
async function saveLocalConfig(data) {
const configPath = await getConfigPath();
const configFilePath = path__default.join(configPath, CONFIG_FILENAME);
await fse__default.writeJson(configFilePath, data, {
encoding: 'utf8',
spaces: 2,
mode: 0o600
});
}
export { CONFIG_FILENAME, getLocalConfig, getTmpStoragePath, saveLocalConfig };
//# sourceMappingURL=local.mjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"local.mjs","sources":["../../src/config/local.ts"],"sourcesContent":["import path from 'path';\nimport os from 'os';\nimport fse from 'fs-extra';\nimport XDGAppPaths from 'xdg-app-paths';\n\nconst APP_FOLDER_NAME = 'com.strapi.cli';\n\nexport const CONFIG_FILENAME = 'config.json';\n\nexport type LocalConfig = {\n token?: string;\n installId?: string;\n};\n\nasync function checkDirectoryExists(directoryPath: string) {\n try {\n const fsStat = await fse.lstat(directoryPath);\n return fsStat.isDirectory();\n } catch (e) {\n return false;\n }\n}\n\n// Determine storage path based on the operating system\nexport async function getTmpStoragePath() {\n const storagePath = path.join(os.tmpdir(), APP_FOLDER_NAME);\n await fse.ensureDir(storagePath);\n return storagePath;\n}\n\nasync function getConfigPath() {\n const configDirs = XDGAppPaths(APP_FOLDER_NAME).configDirs();\n const configPath = configDirs.find(checkDirectoryExists);\n\n if (!configPath) {\n await fse.ensureDir(configDirs[0]);\n return configDirs[0];\n }\n return configPath;\n}\n\nexport async function getLocalConfig(): Promise<LocalConfig> {\n const configPath = await getConfigPath();\n const configFilePath = path.join(configPath, CONFIG_FILENAME);\n await fse.ensureFile(configFilePath);\n try {\n return await fse.readJSON(configFilePath, { encoding: 'utf8', throws: true });\n } catch (e) {\n return {};\n }\n}\n\nexport async function saveLocalConfig(data: LocalConfig) {\n const configPath = await getConfigPath();\n const configFilePath = path.join(configPath, CONFIG_FILENAME);\n await fse.writeJson(configFilePath, data, { encoding: 'utf8', spaces: 2, mode: 0o600 });\n}\n"],"names":["APP_FOLDER_NAME","CONFIG_FILENAME","checkDirectoryExists","directoryPath","fsStat","fse","lstat","isDirectory","e","getTmpStoragePath","storagePath","path","join","os","tmpdir","ensureDir","getConfigPath","configDirs","XDGAppPaths","configPath","find","getLocalConfig","configFilePath","ensureFile","readJSON","encoding","throws","saveLocalConfig","data","writeJson","spaces","mode"],"mappings":";;;;;AAKA,MAAMA,eAAkB,GAAA,gBAAA;AAEjB,MAAMC,kBAAkB;AAO/B,eAAeC,qBAAqBC,aAAqB,EAAA;IACvD,IAAI;AACF,QAAA,MAAMC,MAAS,GAAA,MAAMC,YAAIC,CAAAA,KAAK,CAACH,aAAAA,CAAAA;AAC/B,QAAA,OAAOC,OAAOG,WAAW,EAAA;AAC3B,KAAA,CAAE,OAAOC,CAAG,EAAA;QACV,OAAO,KAAA;AACT;AACF;AAEA;AACO,eAAeC,iBAAAA,GAAAA;AACpB,IAAA,MAAMC,cAAcC,aAAKC,CAAAA,IAAI,CAACC,EAAAA,CAAGC,MAAM,EAAId,EAAAA,eAAAA,CAAAA;IAC3C,MAAMK,YAAAA,CAAIU,SAAS,CAACL,WAAAA,CAAAA;IACpB,OAAOA,WAAAA;AACT;AAEA,eAAeM,aAAAA,GAAAA;IACb,MAAMC,UAAAA,GAAaC,WAAYlB,CAAAA,eAAAA,CAAAA,CAAiBiB,UAAU,EAAA;IAC1D,MAAME,UAAAA,GAAaF,UAAWG,CAAAA,IAAI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