@strapi/cloud-cli 5.38.0 → 5.38.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var version = "5.38.0";
5
+ var version = "5.38.1";
6
6
  var packageJson = {
7
7
  version: version};
8
8
 
@@ -1,4 +1,4 @@
1
- var version = "5.38.0";
1
+ var version = "5.38.1";
2
2
  var packageJson = {
3
3
  version: version};
4
4
 
@@ -1 +1 @@
1
- {"version":3,"file":"pkg.js","sources":["../../src/utils/pkg.ts"],"sourcesContent":["import * as fse from 'fs-extra';\nimport os from 'os';\nimport pkgUp from 'pkg-up';\nimport * as yup from 'yup';\nimport chalk from 'chalk';\nimport { Logger } from '../services/logger';\n\ninterface Export {\n types?: string;\n source: string;\n module?: string;\n import?: string;\n require?: string;\n default: string;\n}\n\nconst packageJsonSchema = yup.object({\n name: yup.string().required(),\n exports: yup.lazy((value) =>\n yup\n .object(\n typeof value === 'object'\n ? Object.entries(value).reduce(\n (acc, [key, value]) => {\n if (typeof value === 'object') {\n acc[key] = yup\n .object({\n types: yup.string().optional(),\n source: yup.string().required(),\n module: yup.string().optional(),\n import: yup.string().required(),\n require: yup.string().required(),\n default: yup.string().required(),\n })\n .noUnknown(true);\n } else {\n acc[key] = yup\n .string()\n .matches(/^\\.\\/.*\\.json$/)\n .required();\n }\n\n return acc;\n },\n {} as Record<string, yup.SchemaOf<string> | yup.SchemaOf<Export>>\n )\n : undefined\n )\n .optional()\n ),\n});\n\ntype PackageJson = yup.Asserts<typeof packageJsonSchema>;\n\n/**\n * @description being a task to load the package.json starting from the current working directory\n * using a shallow find for the package.json and `fs` to read the file. If no package.json is found,\n * the process will throw with an appropriate error message.\n */\nconst loadPkg = async ({ cwd, logger }: { cwd: string; logger: Logger }): Promise<PackageJson> => {\n const pkgPath = await pkgUp({ cwd });\n\n if (!pkgPath) {\n throw new Error('Could not find a package.json in the current directory');\n }\n\n const buffer = await fse.readFile(pkgPath);\n\n const pkg = JSON.parse(buffer.toString());\n\n logger.debug('Loaded package.json:', os.EOL, pkg);\n\n return pkg;\n};\n\n/**\n * @description validate the package.json against a standardised schema using `yup`.\n * If the validation fails, the process will throw with an appropriate error message.\n */\nconst validatePkg = async ({ pkg }: { pkg: object }): Promise<PackageJson> => {\n try {\n return await packageJsonSchema.validate(pkg, {\n strict: true,\n });\n } catch (err) {\n if (err instanceof yup.ValidationError) {\n switch (err.type) {\n case 'required':\n if (err.path) {\n throw new Error(\n `'${err.path}' in 'package.json' is required as type '${chalk.magenta(\n yup.reach(packageJsonSchema, err.path).type\n )}'`\n );\n }\n break;\n /**\n * This will only be thrown if there are keys in the export map\n * that we don't expect so we can therefore make some assumptions\n */\n case 'noUnknown':\n if (err.path && err.params && 'unknown' in err.params) {\n throw new Error(\n `'${err.path}' in 'package.json' contains the unknown key ${chalk.magenta(\n err.params.unknown\n )}, for compatability only the following keys are allowed: ${chalk.magenta(\n \"['types', 'source', 'import', 'require', 'default']\"\n )}`\n );\n }\n break;\n default:\n if (err.path && err.params && 'type' in err.params && 'value' in err.params) {\n throw new Error(\n `'${err.path}' in 'package.json' must be of type '${chalk.magenta(\n err.params.type\n )}' (received '${chalk.magenta(typeof err.params.value)}')`\n );\n }\n }\n }\n\n throw err;\n }\n};\n\nexport type { PackageJson, Export };\nexport { loadPkg, validatePkg };\n"],"names":["yup","object","name","string","required","exports","lazy","value","Object","entries","reduce","acc","key","types","optional","source","module","import","require","default","noUnknown","matches","undefined","loadPkg","cwd","logger","pkgPath","pkgUp","Error","buffer","fse","readFile","pkg","JSON","parse","toString","debug","os","EOL"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgB0BA,cAAAA,CAAIC,MAAM,CAAC;IACnCC,IAAAA,EAAMF,cAAAA,CAAIG,MAAM,EAAA,CAAGC,QAAQ,EAAA;IAC3BC,OAAAA,EAASL,cAAAA,CAAIM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MAAM,IAAIE,KAAAA,CAAM,wDAAA,CAAA;AAClB,IAAA;AAEA,IAAA,MAAMC,MAAAA,GAAS,MAAMC,cAAAA,CAAIC,QAAQ,CAACL,OAAAA,CAAAA;AAElC,IAAA,MAAMM,GAAAA,GAAMC,IAAAA,CAAKC,KAAK,CAACL,OAAOM,QAAQ,EAAA,CAAA;AAEtCV,IAAAA,MAAAA,CAAOW,KAAK,CAAC,sBAAA,EAAwBC,EAAAA,CAAGC,GAAG,EAAEN,GAAAA,CAAAA;IAE7C,OAAOA,GAAAA;AACT;;;;"}
1
+ {"version":3,"file":"pkg.js","sources":["../../src/utils/pkg.ts"],"sourcesContent":["import * as fse from 'fs-extra';\nimport os from 'os';\nimport pkgUp from 'pkg-up';\nimport * as yup from 'yup';\nimport chalk from 'chalk';\nimport { Logger } from '../services/logger';\n\ninterface Export {\n types?: string;\n source: string;\n module?: string;\n import?: string;\n require?: string;\n default: string;\n}\n\nconst packageJsonSchema = yup.object({\n name: yup.string().required(),\n exports: yup.lazy((value) =>\n yup\n .object(\n typeof value === 'object'\n ? Object.entries(value).reduce(\n (acc, [key, value]) => {\n if (typeof value === 'object') {\n acc[key] = yup\n .object({\n types: yup.string().optional(),\n source: yup.string().required(),\n module: yup.string().optional(),\n import: yup.string().required(),\n require: yup.string().required(),\n default: yup.string().required(),\n })\n .noUnknown(true);\n } else {\n acc[key] = yup\n .string()\n .matches(/^\\.\\/.*\\.json$/)\n .required();\n }\n\n return acc;\n },\n {} as Record<string, yup.SchemaOf<string> | yup.SchemaOf<Export>>\n )\n : undefined\n )\n .optional()\n ),\n});\n\ntype PackageJson = yup.Asserts<typeof packageJsonSchema>;\n\n/**\n * @description being a task to load the package.json starting from the current working directory\n * using a shallow find for the package.json and `fs` to read the file. If no package.json is found,\n * the process will throw with an appropriate error message.\n */\nconst loadPkg = async ({ cwd, logger }: { cwd: string; logger: Logger }): Promise<PackageJson> => {\n const pkgPath = await pkgUp({ cwd });\n\n if (!pkgPath) {\n throw new Error('Could not find a package.json in the current directory');\n }\n\n const buffer = await fse.readFile(pkgPath);\n\n const pkg = JSON.parse(buffer.toString());\n\n logger.debug('Loaded package.json:', os.EOL, pkg);\n\n return pkg;\n};\n\n/**\n * @description validate the package.json against a standardised schema using `yup`.\n * If the validation fails, the process will throw with an appropriate error message.\n */\nconst validatePkg = async ({ pkg }: { pkg: object }): Promise<PackageJson> => {\n try {\n return await packageJsonSchema.validate(pkg, {\n strict: true,\n });\n } catch (err) {\n if (err instanceof yup.ValidationError) {\n switch (err.type) {\n case 'required':\n if (err.path) {\n throw new Error(\n `'${err.path}' in 'package.json' is required as type '${chalk.magenta(\n yup.reach(packageJsonSchema, err.path).type\n )}'`\n );\n }\n break;\n /**\n * This will only be thrown if there are keys in the export map\n * that we don't expect so we can therefore make some assumptions\n */\n case 'noUnknown':\n if (err.path && err.params && 'unknown' in err.params) {\n throw new Error(\n `'${err.path}' in 'package.json' contains the unknown key ${chalk.magenta(\n err.params.unknown\n )}, for compatibility only the following keys are allowed: ${chalk.magenta(\n \"['types', 'source', 'import', 'require', 'default']\"\n )}`\n );\n }\n break;\n default:\n if (err.path && err.params && 'type' in err.params && 'value' in err.params) {\n throw new Error(\n `'${err.path}' in 'package.json' must be of type '${chalk.magenta(\n err.params.type\n )}' (received '${chalk.magenta(typeof err.params.value)}')`\n );\n }\n }\n }\n\n throw err;\n }\n};\n\nexport type { PackageJson, Export };\nexport { loadPkg, validatePkg };\n"],"names":["yup","object","name","string","required","exports","lazy","value","Object","entries","reduce","acc","key","types","optional","source","module","import","require","default","noUnknown","matches","undefined","loadPkg","cwd","logger","pkgPath","pkgUp","Error","buffer","fse","readFile","pkg","JSON","parse","toString","debug","os","EOL"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgB0BA,cAAAA,CAAIC,MAAM,CAAC;IACnCC,IAAAA,EAAMF,cAAAA,CAAIG,MAAM,EAAA,CAAGC,QAAQ,EAAA;IAC3BC,OAAAA,EAASL,cAAAA,CAAIM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MAAM,IAAIE,KAAAA,CAAM,wDAAA,CAAA;AAClB,IAAA;AAEA,IAAA,MAAMC,MAAAA,GAAS,MAAMC,cAAAA,CAAIC,QAAQ,CAACL,OAAAA,CAAAA;AAElC,IAAA,MAAMM,GAAAA,GAAMC,IAAAA,CAAKC,KAAK,CAACL,OAAOM,QAAQ,EAAA,CAAA;AAEtCV,IAAAA,MAAAA,CAAOW,KAAK,CAAC,sBAAA,EAAwBC,EAAAA,CAAGC,GAAG,EAAEN,GAAAA,CAAAA;IAE7C,OAAOA,GAAAA;AACT;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"pkg.mjs","sources":["../../src/utils/pkg.ts"],"sourcesContent":["import * as fse from 'fs-extra';\nimport os from 'os';\nimport pkgUp from 'pkg-up';\nimport * as yup from 'yup';\nimport chalk from 'chalk';\nimport { Logger } from '../services/logger';\n\ninterface Export {\n types?: string;\n source: string;\n module?: string;\n import?: string;\n require?: string;\n default: string;\n}\n\nconst packageJsonSchema = yup.object({\n name: yup.string().required(),\n exports: yup.lazy((value) =>\n yup\n .object(\n typeof value === 'object'\n ? Object.entries(value).reduce(\n (acc, [key, value]) => {\n if (typeof value === 'object') {\n acc[key] = yup\n .object({\n types: yup.string().optional(),\n source: yup.string().required(),\n module: yup.string().optional(),\n import: yup.string().required(),\n require: yup.string().required(),\n default: yup.string().required(),\n })\n .noUnknown(true);\n } else {\n acc[key] = yup\n .string()\n .matches(/^\\.\\/.*\\.json$/)\n .required();\n }\n\n return acc;\n },\n {} as Record<string, yup.SchemaOf<string> | yup.SchemaOf<Export>>\n )\n : undefined\n )\n .optional()\n ),\n});\n\ntype PackageJson = yup.Asserts<typeof packageJsonSchema>;\n\n/**\n * @description being a task to load the package.json starting from the current working directory\n * using a shallow find for the package.json and `fs` to read the file. If no package.json is found,\n * the process will throw with an appropriate error message.\n */\nconst loadPkg = async ({ cwd, logger }: { cwd: string; logger: Logger }): Promise<PackageJson> => {\n const pkgPath = await pkgUp({ cwd });\n\n if (!pkgPath) {\n throw new Error('Could not find a package.json in the current directory');\n }\n\n const buffer = await fse.readFile(pkgPath);\n\n const pkg = JSON.parse(buffer.toString());\n\n logger.debug('Loaded package.json:', os.EOL, pkg);\n\n return pkg;\n};\n\n/**\n * @description validate the package.json against a standardised schema using `yup`.\n * If the validation fails, the process will throw with an appropriate error message.\n */\nconst validatePkg = async ({ pkg }: { pkg: object }): Promise<PackageJson> => {\n try {\n return await packageJsonSchema.validate(pkg, {\n strict: true,\n });\n } catch (err) {\n if (err instanceof yup.ValidationError) {\n switch (err.type) {\n case 'required':\n if (err.path) {\n throw new Error(\n `'${err.path}' in 'package.json' is required as type '${chalk.magenta(\n yup.reach(packageJsonSchema, err.path).type\n )}'`\n );\n }\n break;\n /**\n * This will only be thrown if there are keys in the export map\n * that we don't expect so we can therefore make some assumptions\n */\n case 'noUnknown':\n if (err.path && err.params && 'unknown' in err.params) {\n throw new Error(\n `'${err.path}' in 'package.json' contains the unknown key ${chalk.magenta(\n err.params.unknown\n )}, for compatability only the following keys are allowed: ${chalk.magenta(\n \"['types', 'source', 'import', 'require', 'default']\"\n )}`\n );\n }\n break;\n default:\n if (err.path && err.params && 'type' in err.params && 'value' in err.params) {\n throw new Error(\n `'${err.path}' in 'package.json' must be of type '${chalk.magenta(\n err.params.type\n )}' (received '${chalk.magenta(typeof err.params.value)}')`\n );\n }\n }\n }\n\n throw err;\n }\n};\n\nexport type { PackageJson, Export };\nexport { loadPkg, validatePkg };\n"],"names":["yup","object","name","string","required","exports","lazy","value","Object","entries","reduce","acc","key","types","optional","source","module","import","require","default","noUnknown","matches","undefined","loadPkg","cwd","logger","pkgPath","pkgUp","Error","buffer","fse","readFile","pkg","JSON","parse","toString","debug","os","EOL"],"mappings":";;;;;;AAgB0BA,GAAAA,CAAIC,MAAM,CAAC;IACnCC,IAAAA,EAAMF,GAAAA,CAAIG,MAAM,EAAA,CAAGC,QAAQ,EAAA;IAC3BC,OAAAA,EAASL,GAAAA,CAAIM,IAAI,CAAC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,KAAAA,CAAM,wDAAA,CAAA;AAClB,IAAA;AAEA,IAAA,MAAMC,MAAAA,GAAS,MAAMC,GAAAA,CAAIC,QAAQ,CAACL,OAAAA,CAAAA;AAElC,IAAA,MAAMM,GAAAA,GAAMC,IAAAA,CAAKC,KAAK,CAACL,OAAOM,QAAQ,EAAA,CAAA;AAEtCV,IAAAA,MAAAA,CAAOW,KAAK,CAAC,sBAAA,EAAwBC,EAAAA,CAAGC,GAAG,EAAEN,GAAAA,CAAAA;IAE7C,OAAOA,GAAAA;AACT;;;;"}
1
+ {"version":3,"file":"pkg.mjs","sources":["../../src/utils/pkg.ts"],"sourcesContent":["import * as fse from 'fs-extra';\nimport os from 'os';\nimport pkgUp from 'pkg-up';\nimport * as yup from 'yup';\nimport chalk from 'chalk';\nimport { Logger } from '../services/logger';\n\ninterface Export {\n types?: string;\n source: string;\n module?: string;\n import?: string;\n require?: string;\n default: string;\n}\n\nconst packageJsonSchema = yup.object({\n name: yup.string().required(),\n exports: yup.lazy((value) =>\n yup\n .object(\n typeof value === 'object'\n ? Object.entries(value).reduce(\n (acc, [key, value]) => {\n if (typeof value === 'object') {\n acc[key] = yup\n .object({\n types: yup.string().optional(),\n source: yup.string().required(),\n module: yup.string().optional(),\n import: yup.string().required(),\n require: yup.string().required(),\n default: yup.string().required(),\n })\n .noUnknown(true);\n } else {\n acc[key] = yup\n .string()\n .matches(/^\\.\\/.*\\.json$/)\n .required();\n }\n\n return acc;\n },\n {} as Record<string, yup.SchemaOf<string> | yup.SchemaOf<Export>>\n )\n : undefined\n )\n .optional()\n ),\n});\n\ntype PackageJson = yup.Asserts<typeof packageJsonSchema>;\n\n/**\n * @description being a task to load the package.json starting from the current working directory\n * using a shallow find for the package.json and `fs` to read the file. If no package.json is found,\n * the process will throw with an appropriate error message.\n */\nconst loadPkg = async ({ cwd, logger }: { cwd: string; logger: Logger }): Promise<PackageJson> => {\n const pkgPath = await pkgUp({ cwd });\n\n if (!pkgPath) {\n throw new Error('Could not find a package.json in the current directory');\n }\n\n const buffer = await fse.readFile(pkgPath);\n\n const pkg = JSON.parse(buffer.toString());\n\n logger.debug('Loaded package.json:', os.EOL, pkg);\n\n return pkg;\n};\n\n/**\n * @description validate the package.json against a standardised schema using `yup`.\n * If the validation fails, the process will throw with an appropriate error message.\n */\nconst validatePkg = async ({ pkg }: { pkg: object }): Promise<PackageJson> => {\n try {\n return await packageJsonSchema.validate(pkg, {\n strict: true,\n });\n } catch (err) {\n if (err instanceof yup.ValidationError) {\n switch (err.type) {\n case 'required':\n if (err.path) {\n throw new Error(\n `'${err.path}' in 'package.json' is required as type '${chalk.magenta(\n yup.reach(packageJsonSchema, err.path).type\n )}'`\n );\n }\n break;\n /**\n * This will only be thrown if there are keys in the export map\n * that we don't expect so we can therefore make some assumptions\n */\n case 'noUnknown':\n if (err.path && err.params && 'unknown' in err.params) {\n throw new Error(\n `'${err.path}' in 'package.json' contains the unknown key ${chalk.magenta(\n err.params.unknown\n )}, for compatibility only the following keys are allowed: ${chalk.magenta(\n \"['types', 'source', 'import', 'require', 'default']\"\n )}`\n );\n }\n break;\n default:\n if (err.path && err.params && 'type' in err.params && 'value' in err.params) {\n throw new Error(\n `'${err.path}' in 'package.json' must be of type '${chalk.magenta(\n err.params.type\n )}' (received '${chalk.magenta(typeof err.params.value)}')`\n );\n }\n }\n }\n\n throw err;\n }\n};\n\nexport type { PackageJson, Export };\nexport { loadPkg, validatePkg };\n"],"names":["yup","object","name","string","required","exports","lazy","value","Object","entries","reduce","acc","key","types","optional","source","module","import","require","default","noUnknown","matches","undefined","loadPkg","cwd","logger","pkgPath","pkgUp","Error","buffer","fse","readFile","pkg","JSON","parse","toString","debug","os","EOL"],"mappings":";;;;;;AAgB0BA,GAAAA,CAAIC,MAAM,CAAC;IACnCC,IAAAA,EAAMF,GAAAA,CAAIG,MAAM,EAAA,CAAGC,QAAQ,EAAA;IAC3BC,OAAAA,EAASL,GAAAA,CAAIM,IAAI,CAAC,CAACC,QACjBP,GAAAA,CAC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AA;AAClB,IAAA;AAEA,IAAA,MAAMC,MAAAA,GAAS,MAAMC,GAAAA,CAAIC,QAAQ,CAACL,OAAAA,CAAAA;AAElC,IAAA,MAAMM,GAAAA,GAAMC,IAAAA,CAAKC,KAAK,CAACL,OAAOM,QAAQ,EAAA,CAAA;AAEtCV,IAAAA,MAAAA,CAAOW,KAAK,CAAC,sBAAA,EAAwBC,EAAAA,CAAGC,GAAG,EAAEN,GAAAA,CAAAA;IAE7C,OAAOA,GAAAA;AACT;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strapi/cloud-cli",
3
- "version": "5.38.0",
3
+ "version": "5.38.1",
4
4
  "description": "Commands to interact with the Strapi Cloud",
5
5
  "keywords": [
6
6
  "strapi",
@@ -13,7 +13,8 @@
13
13
  },
14
14
  "repository": {
15
15
  "type": "git",
16
- "url": "git://github.com/strapi/strapi.git"
16
+ "url": "git://github.com/strapi/strapi.git",
17
+ "directory": "packages/cli/cloud"
17
18
  },
18
19
  "license": "SEE LICENSE IN LICENSE",
19
20
  "author": {
@@ -47,7 +48,7 @@
47
48
  "watch": "run -T rollup -c -w"
48
49
  },
49
50
  "dependencies": {
50
- "@strapi/utils": "5.38.0",
51
+ "@strapi/utils": "5.38.1",
51
52
  "axios": "1.13.5",
52
53
  "boxen": "5.1.2",
53
54
  "chalk": "4.1.2",
@@ -60,11 +61,11 @@
60
61
  "jsonwebtoken": "9.0.0",
61
62
  "jwks-rsa": "3.1.0",
62
63
  "lodash": "4.17.23",
63
- "minimatch": "10.2.2",
64
+ "minimatch": "10.2.4",
64
65
  "open": "8.4.0",
65
66
  "ora": "5.4.1",
66
67
  "pkg-up": "3.1.0",
67
- "tar": "7.5.9",
68
+ "tar": "7.5.10",
68
69
  "xdg-app-paths": "8.3.0",
69
70
  "yup": "0.32.9"
70
71
  },
@@ -72,8 +73,8 @@
72
73
  "@types/cli-progress": "3.11.5",
73
74
  "@types/eventsource": "1.1.15",
74
75
  "@types/lodash": "^4.14.191",
75
- "eslint-config-custom": "5.38.0",
76
- "tsconfig": "5.38.0"
76
+ "eslint-config-custom": "5.38.1",
77
+ "tsconfig": "5.38.1"
77
78
  },
78
79
  "engines": {
79
80
  "node": ">=20.0.0 <=24.x.x",