@contentful/app-scripts 2.5.5 → 2.5.8
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.
- package/lib/activate/activate-bundle.js +28 -1
- package/lib/activate/build-bundle-activate-settings.js +2 -1
- package/lib/activate/get-activate-args.js +2 -1
- package/lib/add-locations/add-locations.js +2 -1
- package/lib/add-locations/build-add-locations-settings.js +3 -2
- package/lib/analytics.d.ts +1 -1
- package/lib/analytics.js +5 -3
- package/lib/bin.js +3 -2
- package/lib/build-functions/build-functions.js +10 -20
- package/lib/build-functions/prompt-build-functions-options.js +2 -1
- package/lib/cache-credential/index.js +2 -1
- package/lib/clean-up/build-clean-up-settings.js +2 -1
- package/lib/clean-up/clean-up-bundles.js +2 -1
- package/lib/clean-up/get-clean-up-settings.js +2 -1
- package/lib/create-app-definition/build-app-definition-settings.js +2 -1
- package/lib/create-app-definition/build-app-parameter-settings.js +2 -1
- package/lib/create-app-definition/create-app-definition.js +2 -1
- package/lib/create-type-safe-locations.d.ts +1 -1
- package/lib/create-type-safe-locations.js +2 -1
- package/lib/definition-api.js +3 -2
- package/lib/feedback/feedback.js +3 -2
- package/lib/generate-function/build-generate-function-settings.js +4 -3
- package/lib/generate-function/clone.js +11 -10
- package/lib/generate-function/create-function.js +2 -1
- package/lib/generate-function/get-github-folder-names.js +10 -2
- package/lib/generate-function/logger.js +8 -7
- package/lib/generate-function/utils/file.js +5 -4
- package/lib/generate-function/utils/package.js +2 -1
- package/lib/get-app-info.d.ts +4 -4
- package/lib/get-management-token.js +2 -1
- package/lib/install/install.js +2 -1
- package/lib/open/open-settings.js +2 -1
- package/lib/organization-api.js +3 -2
- package/lib/types.d.ts +1 -0
- package/lib/upload/build-upload-settings.js +3 -2
- package/lib/upload/create-app-bundle.js +4 -3
- package/lib/upload/create-app-upload.js +2 -1
- package/lib/upload/create-zip-from-directory.d.ts +3 -1
- package/lib/upload/create-zip-from-directory.js +2 -1
- package/lib/upload/get-upload-settings-args.js +2 -1
- package/lib/upload/validate-bundle.d.ts +1 -1
- package/lib/upsert-actions/client.js +4 -3
- package/lib/upsert-actions/get-cli-args.js +2 -1
- package/lib/upsert-actions/make-cma-payload.js +2 -1
- package/lib/upsert-actions/prompt-interactive-args.js +2 -1
- package/lib/upsert-actions/upsert-actions.js +5 -4
- package/lib/upsert-actions/validation.js +2 -2
- package/lib/utils.d.ts +1 -1
- package/lib/utils.js +3 -3
- package/lib/validate-arguments.js +2 -1
- package/package.json +11 -10
- package/LICENSE +0 -21
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.activateBundle =
|
|
6
|
+
exports.activateBundle = void 0;
|
|
7
7
|
const ora_1 = __importDefault(require("ora"));
|
|
8
8
|
const chalk_1 = require("chalk");
|
|
9
9
|
const utils_1 = require("../utils");
|
|
@@ -54,6 +54,32 @@ async function activateBundle({ accessToken, organization, definition, bundleId,
|
|
|
54
54
|
}, currentDefinition);
|
|
55
55
|
}
|
|
56
56
|
catch (err) {
|
|
57
|
+
let errorData;
|
|
58
|
+
try {
|
|
59
|
+
errorData = JSON.parse(err.message);
|
|
60
|
+
}
|
|
61
|
+
catch {
|
|
62
|
+
errorData = null;
|
|
63
|
+
}
|
|
64
|
+
if (errorData?.status === 400 && errorData?.message?.includes('Function upload failed')) {
|
|
65
|
+
// Extract first line of error message (the actual error type)
|
|
66
|
+
const firstLine = errorData.message.split('\n')[0];
|
|
67
|
+
const errorType = firstLine.replace('Function upload failed: ', '');
|
|
68
|
+
// Clean display
|
|
69
|
+
console.error(`\n${(0, chalk_1.bold)((0, chalk_1.yellow)('❌ Function Upload Failed'))}\n`);
|
|
70
|
+
console.error(`${(0, chalk_1.bold)('Error:')} ${errorType}\n`);
|
|
71
|
+
if (errorData.details?.errors?.[0]) {
|
|
72
|
+
// Show just the first few lines of stack trace
|
|
73
|
+
const firstError = errorData.details.errors[0];
|
|
74
|
+
const lines = firstError.split('\n').slice(0, 3);
|
|
75
|
+
console.error(lines.join('\n'));
|
|
76
|
+
}
|
|
77
|
+
console.error(`\n${(0, chalk_1.cyan)('💡 Tip:')} Line numbers may reference minified code, rebuild with ${(0, chalk_1.bold)('--no-minify')} to debug your source code:`);
|
|
78
|
+
console.error(` ${(0, chalk_1.bold)('npm run build:functions -- --no-minify && npm run upload')}\n`);
|
|
79
|
+
// Don't re-throw (prevents Commander duplicate display)
|
|
80
|
+
process.exit(1);
|
|
81
|
+
}
|
|
82
|
+
// Default error handling for other errors
|
|
57
83
|
(0, utils_1.throwError)(err, 'Something went wrong activating your bundle. Make sure you used the correct definition-id.');
|
|
58
84
|
}
|
|
59
85
|
finally {
|
|
@@ -67,3 +93,4 @@ async function activateBundle({ accessToken, organization, definition, bundleId,
|
|
|
67
93
|
Ready to share your app with the world? Submit it to the Developer Showcase (${(0, chalk_1.cyan)('https://ctfl.io/dev-showcase')}) or our Marketplace (${(0, chalk_1.cyan)('https://ctfl.io/submit-app')}).
|
|
68
94
|
`);
|
|
69
95
|
}
|
|
96
|
+
exports.activateBundle = activateBundle;
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.buildBundleActivateSettings =
|
|
6
|
+
exports.buildBundleActivateSettings = void 0;
|
|
7
7
|
const inquirer_1 = __importDefault(require("inquirer"));
|
|
8
8
|
const get_app_info_1 = require("../get-app-info");
|
|
9
9
|
async function buildBundleActivateSettings(options) {
|
|
@@ -33,3 +33,4 @@ async function buildBundleActivateSettings(options) {
|
|
|
33
33
|
...appInfo,
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
|
+
exports.buildBundleActivateSettings = buildBundleActivateSettings;
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.getActivateSettingsArgs =
|
|
6
|
+
exports.getActivateSettingsArgs = void 0;
|
|
7
7
|
const chalk_1 = __importDefault(require("chalk"));
|
|
8
8
|
const ora_1 = __importDefault(require("ora"));
|
|
9
9
|
const get_app_info_1 = require("../get-app-info");
|
|
@@ -37,3 +37,4 @@ async function getActivateSettingsArgs(options) {
|
|
|
37
37
|
validateSpinner.stop();
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
|
+
exports.getActivateSettingsArgs = getActivateSettingsArgs;
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.add =
|
|
6
|
+
exports.add = void 0;
|
|
7
7
|
const ora_1 = __importDefault(require("ora"));
|
|
8
8
|
const chalk_1 = require("chalk");
|
|
9
9
|
const utils_1 = require("../utils");
|
|
@@ -51,3 +51,4 @@ async function add(settings) {
|
|
|
51
51
|
activationSpinner.stop();
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
+
exports.add = add;
|
|
@@ -3,8 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.buildAddLocationsSettings =
|
|
7
|
-
exports.hostProtocolFilter = hostProtocolFilter;
|
|
6
|
+
exports.hostProtocolFilter = exports.buildAddLocationsSettings = void 0;
|
|
8
7
|
const chalk_1 = __importDefault(require("chalk"));
|
|
9
8
|
const inquirer_1 = require("inquirer");
|
|
10
9
|
const get_app_info_1 = require("../get-app-info");
|
|
@@ -60,6 +59,8 @@ async function buildAddLocationsSettings(options) {
|
|
|
60
59
|
...appInfo,
|
|
61
60
|
};
|
|
62
61
|
}
|
|
62
|
+
exports.buildAddLocationsSettings = buildAddLocationsSettings;
|
|
63
63
|
function hostProtocolFilter(input) {
|
|
64
64
|
return input.replace(/^https?:\/\//, '');
|
|
65
65
|
}
|
|
66
|
+
exports.hostProtocolFilter = hostProtocolFilter;
|
package/lib/analytics.d.ts
CHANGED
package/lib/analytics.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.track =
|
|
3
|
+
exports.track = void 0;
|
|
4
4
|
const analytics_node_1 = require("@segment/analytics-node");
|
|
5
5
|
// Public write key scoped to data source
|
|
6
6
|
const SEGMENT_WRITE_KEY = 'IzCq3j4dQlTAgLdMykRW9oBHQKUy1xMm';
|
|
@@ -11,7 +11,7 @@ const SEGMENT_WRITE_KEY = 'IzCq3j4dQlTAgLdMykRW9oBHQKUy1xMm';
|
|
|
11
11
|
* @param {boolean} properties.ci value if --ci flag has been set
|
|
12
12
|
* @returns
|
|
13
13
|
*/
|
|
14
|
-
function track({ command, ci }) {
|
|
14
|
+
async function track({ command, ci }) {
|
|
15
15
|
if (process.env.DISABLE_ANALYTICS) {
|
|
16
16
|
return;
|
|
17
17
|
}
|
|
@@ -28,12 +28,14 @@ function track({ command, ci }) {
|
|
|
28
28
|
command,
|
|
29
29
|
ci: String(ci),
|
|
30
30
|
},
|
|
31
|
-
anonymousId: Date.now().toString(),
|
|
31
|
+
anonymousId: Date.now().toString(),
|
|
32
32
|
timestamp: new Date(),
|
|
33
33
|
});
|
|
34
|
+
await client.closeAndFlush();
|
|
34
35
|
// eslint-disable-next-line no-empty
|
|
35
36
|
}
|
|
36
37
|
catch (e) {
|
|
37
38
|
// ignore any error, to not block the call
|
|
38
39
|
}
|
|
39
40
|
}
|
|
41
|
+
exports.track = track;
|
package/lib/bin.js
CHANGED
|
@@ -80,6 +80,7 @@ async function runCommand(command, options) {
|
|
|
80
80
|
.option('-e, --esbuild-config <path>', 'custom esbuild config file path')
|
|
81
81
|
.option('-m, --manifest-file <path>', 'Contentful app manifest file path')
|
|
82
82
|
.option('-w, --watch', 'watch for changes')
|
|
83
|
+
.option('--no-minify', 'disable minification for debugging (not recommended for production)')
|
|
83
84
|
.action(async (options) => {
|
|
84
85
|
await runCommand(index_1.buildFunctions, options);
|
|
85
86
|
});
|
|
@@ -114,8 +115,8 @@ async function runCommand(command, options) {
|
|
|
114
115
|
.action(async (options) => {
|
|
115
116
|
await runCommand(index_1.addLocations, options);
|
|
116
117
|
});
|
|
117
|
-
commander_1.program.hook('preAction', (thisCommand) => {
|
|
118
|
-
(0, index_1.track)({ command: thisCommand.args[0], ci: thisCommand.opts().ci });
|
|
118
|
+
commander_1.program.hook('preAction', async (thisCommand) => {
|
|
119
|
+
await (0, index_1.track)({ command: thisCommand.args[0], ci: thisCommand.opts().ci });
|
|
119
120
|
});
|
|
120
121
|
await commander_1.program.parseAsync(process.argv);
|
|
121
122
|
})().catch((e) => {
|
|
@@ -15,29 +15,18 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) ||
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
35
25
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
27
|
};
|
|
38
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.resolveEsBuildConfig = exports.validateFunctions = void 0;
|
|
40
|
-
exports.buildFunctions = buildFunctions;
|
|
29
|
+
exports.buildFunctions = exports.resolveEsBuildConfig = exports.validateFunctions = void 0;
|
|
41
30
|
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
42
31
|
const esbuild_1 = __importDefault(require("esbuild"));
|
|
43
32
|
const node_path_1 = __importStar(require("node:path"));
|
|
@@ -130,7 +119,7 @@ const resolveEsBuildConfig = (options, manifest, cwd = process.cwd()) => {
|
|
|
130
119
|
outdir: 'build',
|
|
131
120
|
format: 'esm',
|
|
132
121
|
target: 'es2022',
|
|
133
|
-
minify: true,
|
|
122
|
+
minify: options.minify ?? true,
|
|
134
123
|
define: {
|
|
135
124
|
global: 'globalThis',
|
|
136
125
|
},
|
|
@@ -161,3 +150,4 @@ async function buildFunctions(options) {
|
|
|
161
150
|
throw Error(error.message, { cause: error.cause });
|
|
162
151
|
}
|
|
163
152
|
}
|
|
153
|
+
exports.buildFunctions = buildFunctions;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.promptBuildFunctionsOptions =
|
|
3
|
+
exports.promptBuildFunctionsOptions = void 0;
|
|
4
4
|
const inquirer_1 = require("inquirer");
|
|
5
5
|
const constants_1 = require("../constants");
|
|
6
6
|
async function promptBuildFunctionsOptions(options) {
|
|
@@ -32,3 +32,4 @@ async function promptBuildFunctionsOptions(options) {
|
|
|
32
32
|
const buildFunctionsOptions = await (0, inquirer_1.prompt)(prompts);
|
|
33
33
|
return buildFunctionsOptions;
|
|
34
34
|
}
|
|
35
|
+
exports.promptBuildFunctionsOptions = promptBuildFunctionsOptions;
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.cacheEnvVars =
|
|
6
|
+
exports.cacheEnvVars = void 0;
|
|
7
7
|
const dotenv_1 = __importDefault(require("dotenv"));
|
|
8
8
|
const node_fs_1 = __importDefault(require("node:fs"));
|
|
9
9
|
const os_1 = require("os");
|
|
@@ -71,3 +71,4 @@ async function cacheEnvVars(envObj) {
|
|
|
71
71
|
`);
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
+
exports.cacheEnvVars = cacheEnvVars;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.buildCleanUpSettings =
|
|
3
|
+
exports.buildCleanUpSettings = void 0;
|
|
4
4
|
const inquirer_1 = require("inquirer");
|
|
5
5
|
const constants_1 = require("../constants");
|
|
6
6
|
const get_app_info_1 = require("../get-app-info");
|
|
@@ -32,3 +32,4 @@ async function buildCleanUpSettings(options) {
|
|
|
32
32
|
...appInfo,
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
|
+
exports.buildCleanUpSettings = buildCleanUpSettings;
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.cleanUpBundles =
|
|
6
|
+
exports.cleanUpBundles = void 0;
|
|
7
7
|
const chalk_1 = __importDefault(require("chalk"));
|
|
8
8
|
const ora_1 = __importDefault(require("ora"));
|
|
9
9
|
const bottleneck_1 = __importDefault(require("bottleneck"));
|
|
@@ -99,3 +99,4 @@ ${chalk_1.default.cyan('Info:')} ${bundlesToDelete.length} bundle${bundlesToDele
|
|
|
99
99
|
return (0, utils_1.throwError)(e, 'Something went wrong deleting the bundles');
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
|
+
exports.cleanUpBundles = cleanUpBundles;
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.getCleanUpSettingsArgs =
|
|
6
|
+
exports.getCleanUpSettingsArgs = void 0;
|
|
7
7
|
const chalk_1 = __importDefault(require("chalk"));
|
|
8
8
|
const ora_1 = __importDefault(require("ora"));
|
|
9
9
|
const constants_1 = require("../constants");
|
|
@@ -37,3 +37,4 @@ async function getCleanUpSettingsArgs(options) {
|
|
|
37
37
|
validateSpinner.stop();
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
|
+
exports.getCleanUpSettingsArgs = getCleanUpSettingsArgs;
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.buildAppDefinitionSettings =
|
|
6
|
+
exports.buildAppDefinitionSettings = void 0;
|
|
7
7
|
const chalk_1 = __importDefault(require("chalk"));
|
|
8
8
|
const inquirer_1 = __importDefault(require("inquirer"));
|
|
9
9
|
const node_path_1 = __importDefault(require("node:path"));
|
|
@@ -44,3 +44,4 @@ NOTE: This will create an app definition in your Contentful organization.
|
|
|
44
44
|
appDefinitionSettings.locations = ['dialog', ...appDefinitionSettings.locations];
|
|
45
45
|
return appDefinitionSettings;
|
|
46
46
|
}
|
|
47
|
+
exports.buildAppDefinitionSettings = buildAppDefinitionSettings;
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.buildAppParameterSettings =
|
|
6
|
+
exports.buildAppParameterSettings = void 0;
|
|
7
7
|
const inquirer_1 = __importDefault(require("inquirer"));
|
|
8
8
|
const lodash_1 = require("lodash");
|
|
9
9
|
const PARAMETER_ID_RE = /^[a-zA-Z][a-zA-Z0-9_]*$/;
|
|
@@ -178,3 +178,4 @@ async function buildAppParameterSettings() {
|
|
|
178
178
|
}
|
|
179
179
|
return parameters;
|
|
180
180
|
}
|
|
181
|
+
exports.buildAppParameterSettings = buildAppParameterSettings;
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.createAppDefinition =
|
|
6
|
+
exports.createAppDefinition = void 0;
|
|
7
7
|
const node_path_1 = __importDefault(require("node:path"));
|
|
8
8
|
const contentful_management_1 = require("contentful-management");
|
|
9
9
|
const chalk_1 = __importDefault(require("chalk"));
|
|
@@ -95,3 +95,4 @@ async function createAppDefinition(accessToken, appDefinitionSettings) {
|
|
|
95
95
|
throw err;
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
|
+
exports.createAppDefinition = createAppDefinition;
|
|
@@ -10,6 +10,6 @@ export declare function createTypeSafeLocations(settings: LocationsSettings): ({
|
|
|
10
10
|
location: "page";
|
|
11
11
|
fieldTypes?: undefined;
|
|
12
12
|
} | {
|
|
13
|
-
location: "app-config" | "entry-sidebar" | "entry-editor" | "dialog" | "home";
|
|
13
|
+
location: "app-config" | "entry-sidebar" | "entry-editor" | "dialog" | "home" | "agent";
|
|
14
14
|
fieldTypes?: undefined;
|
|
15
15
|
})[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createTypeSafeLocations =
|
|
3
|
+
exports.createTypeSafeLocations = void 0;
|
|
4
4
|
function createTypeSafeLocations(settings) {
|
|
5
5
|
const { locations, fields, pageNav, pageNavLinkName, pageNavLinkPath } = settings;
|
|
6
6
|
return locations.map((location) => {
|
|
@@ -28,3 +28,4 @@ function createTypeSafeLocations(settings) {
|
|
|
28
28
|
};
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
|
+
exports.createTypeSafeLocations = createTypeSafeLocations;
|
package/lib/definition-api.js
CHANGED
|
@@ -3,8 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.selectDefinition =
|
|
7
|
-
exports.getDefinitionById = getDefinitionById;
|
|
6
|
+
exports.getDefinitionById = exports.selectDefinition = void 0;
|
|
8
7
|
const ora_1 = __importDefault(require("ora"));
|
|
9
8
|
const utils_1 = require("./utils");
|
|
10
9
|
const constants_1 = require("./constants");
|
|
@@ -36,6 +35,7 @@ async function selectDefinition(client, orgId) {
|
|
|
36
35
|
defSpinner.stop();
|
|
37
36
|
return await (0, utils_1.selectFromList)(definitions, 'Select an app:', constants_1.APP_DEF_ENV_KEY);
|
|
38
37
|
}
|
|
38
|
+
exports.selectDefinition = selectDefinition;
|
|
39
39
|
async function getDefinitionById(client, orgId, defId) {
|
|
40
40
|
try {
|
|
41
41
|
const organization = await client.getOrganization(orgId);
|
|
@@ -52,3 +52,4 @@ async function getDefinitionById(client, orgId, defId) {
|
|
|
52
52
|
return (0, utils_1.throwError)(err, 'Could not fetch your app-definition. Make sure you provided a valid definition id or access token.');
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
+
exports.getDefinitionById = getDefinitionById;
|
package/lib/feedback/feedback.js
CHANGED
|
@@ -3,15 +3,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.openFeedbackLink =
|
|
7
|
-
exports.logFeedbackNudge = logFeedbackNudge;
|
|
6
|
+
exports.logFeedbackNudge = exports.openFeedbackLink = void 0;
|
|
8
7
|
const chalk_1 = __importDefault(require("chalk"));
|
|
9
8
|
const open_1 = __importDefault(require("open"));
|
|
10
9
|
function openFeedbackLink() {
|
|
11
10
|
(0, open_1.default)('https://87dc93gvoy0.typeform.com/to/d1RgWfZX');
|
|
12
11
|
}
|
|
12
|
+
exports.openFeedbackLink = openFeedbackLink;
|
|
13
13
|
function logFeedbackNudge() {
|
|
14
14
|
console.log(`Have any feedback for the ${chalk_1.default.blue('Conte')}${chalk_1.default.yellow('ntful')}${chalk_1.default.red(' CLI')}? We'd love to hear from you! Check out our five question developer experience survey at:
|
|
15
15
|
${chalk_1.default.underline('https://87dc93gvoy0.typeform.com/to/d1RgWfZX')}
|
|
16
16
|
`);
|
|
17
17
|
}
|
|
18
|
+
exports.logFeedbackNudge = logFeedbackNudge;
|
|
@@ -3,9 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.buildGenerateFunctionSettingsInteractive =
|
|
7
|
-
exports.validateArguments = validateArguments;
|
|
8
|
-
exports.buildGenerateFunctionSettingsCLI = buildGenerateFunctionSettingsCLI;
|
|
6
|
+
exports.buildGenerateFunctionSettingsCLI = exports.validateArguments = exports.buildGenerateFunctionSettingsInteractive = void 0;
|
|
9
7
|
const inquirer_1 = __importDefault(require("inquirer"));
|
|
10
8
|
const node_path_1 = __importDefault(require("node:path"));
|
|
11
9
|
const get_github_folder_names_1 = require("./get-github-folder-names");
|
|
@@ -45,6 +43,7 @@ async function buildGenerateFunctionSettingsInteractive() {
|
|
|
45
43
|
baseSettings.language = sourceSpecificSettings.language;
|
|
46
44
|
return baseSettings;
|
|
47
45
|
}
|
|
46
|
+
exports.buildGenerateFunctionSettingsInteractive = buildGenerateFunctionSettingsInteractive;
|
|
48
47
|
function validateFunctionName(baseSettings) {
|
|
49
48
|
if (constants_1.BANNED_FUNCTION_NAMES.includes(baseSettings.name)) {
|
|
50
49
|
throw new types_1.ValidationError(chalk_1.default.red(`Invalid function name: ${baseSettings.name} is not allowed.`));
|
|
@@ -81,6 +80,7 @@ function validateArguments(options) {
|
|
|
81
80
|
}
|
|
82
81
|
}
|
|
83
82
|
}
|
|
83
|
+
exports.validateArguments = validateArguments;
|
|
84
84
|
async function buildGenerateFunctionSettingsCLI(options) {
|
|
85
85
|
const validateSpinner = (0, ora_1.default)('Validating your input\n').start();
|
|
86
86
|
const settings = {};
|
|
@@ -110,3 +110,4 @@ async function buildGenerateFunctionSettingsCLI(options) {
|
|
|
110
110
|
validateSpinner.stop();
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
|
+
exports.buildGenerateFunctionSettingsCLI = buildGenerateFunctionSettingsCLI;
|
|
@@ -3,16 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.cloneFunction =
|
|
7
|
-
exports.getCloneURL = getCloneURL;
|
|
8
|
-
exports.touchupAppManifest = touchupAppManifest;
|
|
9
|
-
exports.moveFilesToFinalDirectory = moveFilesToFinalDirectory;
|
|
10
|
-
exports.renameClonedFiles = renameClonedFiles;
|
|
11
|
-
exports.resolvePaths = resolvePaths;
|
|
12
|
-
exports.cloneAndResolveManifests = cloneAndResolveManifests;
|
|
13
|
-
exports.clone = clone;
|
|
14
|
-
exports.mergeAppManifest = mergeAppManifest;
|
|
15
|
-
exports.updatePackageJsonWithBuild = updatePackageJsonWithBuild;
|
|
6
|
+
exports.updatePackageJsonWithBuild = exports.mergeAppManifest = exports.clone = exports.cloneAndResolveManifests = exports.resolvePaths = exports.renameClonedFiles = exports.moveFilesToFinalDirectory = exports.touchupAppManifest = exports.getCloneURL = exports.cloneFunction = void 0;
|
|
16
7
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
17
8
|
const tiged = require('tiged');
|
|
18
9
|
const node_fs_1 = __importDefault(require("node:fs"));
|
|
@@ -46,9 +37,11 @@ async function cloneFunction(localPath, settings) {
|
|
|
46
37
|
throw Error(chalk_1.default.red('Failed to clone function ') + (0, logger_1.highlight)(chalk_1.default.cyan(settings.name)));
|
|
47
38
|
}
|
|
48
39
|
}
|
|
40
|
+
exports.cloneFunction = cloneFunction;
|
|
49
41
|
function getCloneURL(settings) {
|
|
50
42
|
return `${constants_1.REPO_URL}/${settings.example}/${settings.language}`;
|
|
51
43
|
}
|
|
44
|
+
exports.getCloneURL = getCloneURL;
|
|
52
45
|
async function touchupAppManifest(localPath, settings, renameFunctionFile) {
|
|
53
46
|
const appManifestPath = (0, node_path_1.resolve)(localPath, constants_1.CONTENTFUL_APP_MANIFEST);
|
|
54
47
|
const appManifest = JSON.parse(node_fs_1.default.readFileSync(appManifestPath, 'utf-8'));
|
|
@@ -60,6 +53,7 @@ async function touchupAppManifest(localPath, settings, renameFunctionFile) {
|
|
|
60
53
|
entry.entryFile = `functions/${renameFunctionFile}`;
|
|
61
54
|
await node_fs_1.default.writeFileSync(appManifestPath, JSON.stringify(appManifest, null, 2));
|
|
62
55
|
}
|
|
56
|
+
exports.touchupAppManifest = touchupAppManifest;
|
|
63
57
|
function moveFilesToFinalDirectory(localTmpPath, localFunctionsPath, localPath) {
|
|
64
58
|
// Create functions directory if it doesn't exist
|
|
65
59
|
if (!node_fs_1.default.existsSync(localFunctionsPath)) {
|
|
@@ -81,6 +75,7 @@ function moveFilesToFinalDirectory(localTmpPath, localFunctionsPath, localPath)
|
|
|
81
75
|
// Clean up tmp directory
|
|
82
76
|
node_fs_1.default.rmSync(localTmpPath, { recursive: true, force: true });
|
|
83
77
|
}
|
|
78
|
+
exports.moveFilesToFinalDirectory = moveFilesToFinalDirectory;
|
|
84
79
|
function renameClonedFiles(localTmpPath, settings) {
|
|
85
80
|
const files = node_fs_1.default.readdirSync(localTmpPath);
|
|
86
81
|
const functionFile = files.find((file) => file.endsWith('.ts') || file.endsWith('.js'));
|
|
@@ -91,11 +86,13 @@ function renameClonedFiles(localTmpPath, settings) {
|
|
|
91
86
|
node_fs_1.default.renameSync((0, node_path_1.resolve)(localTmpPath, functionFile), (0, node_path_1.resolve)(localTmpPath, newFunctionFile));
|
|
92
87
|
return newFunctionFile;
|
|
93
88
|
}
|
|
89
|
+
exports.renameClonedFiles = renameClonedFiles;
|
|
94
90
|
function resolvePaths(localPath) {
|
|
95
91
|
const localTmpPath = (0, node_path_1.resolve)(localPath, 'tmp'); // we require a tmp directory because tiged overwrites all files in the target directory
|
|
96
92
|
const localFunctionsPath = (0, node_path_1.resolve)(localPath, 'functions');
|
|
97
93
|
return { localTmpPath, localFunctionsPath };
|
|
98
94
|
}
|
|
95
|
+
exports.resolvePaths = resolvePaths;
|
|
99
96
|
async function cloneAndResolveManifests(cloneURL, localTmpPath, localPath, localFunctionsPath, keepPackageJson = false) {
|
|
100
97
|
const tigedInstance = await clone(cloneURL, localTmpPath);
|
|
101
98
|
// merge the manifest from the template folder to the root folder
|
|
@@ -118,11 +115,13 @@ async function cloneAndResolveManifests(cloneURL, localTmpPath, localPath, local
|
|
|
118
115
|
files: ignoredFiles.map((fileName) => `${localTmpPath}/${fileName}`),
|
|
119
116
|
});
|
|
120
117
|
}
|
|
118
|
+
exports.cloneAndResolveManifests = cloneAndResolveManifests;
|
|
121
119
|
async function clone(cloneURL, localFunctionsPath) {
|
|
122
120
|
const tigedInstance = tiged(cloneURL, { mode: 'tar', disableCache: true, force: true });
|
|
123
121
|
await tigedInstance.clone(localFunctionsPath);
|
|
124
122
|
return tigedInstance;
|
|
125
123
|
}
|
|
124
|
+
exports.clone = clone;
|
|
126
125
|
async function mergeAppManifest(localPath, localTmpPath) {
|
|
127
126
|
const finalAppManifestType = await (0, file_1.exists)((0, node_path_1.resolve)(localPath, constants_1.CONTENTFUL_APP_MANIFEST));
|
|
128
127
|
const tmpAppManifestType = await (0, file_1.whichExists)(localTmpPath, [constants_1.CONTENTFUL_APP_MANIFEST, constants_1.APP_MANIFEST]); // find the app manifest in the cloned files
|
|
@@ -149,6 +148,7 @@ async function mergeAppManifest(localPath, localTmpPath) {
|
|
|
149
148
|
});
|
|
150
149
|
}
|
|
151
150
|
}
|
|
151
|
+
exports.mergeAppManifest = mergeAppManifest;
|
|
152
152
|
async function updatePackageJsonWithBuild(localPath, localTmpPath) {
|
|
153
153
|
const packageJsonLocation = (0, node_path_1.resolve)(localPath, 'package.json');
|
|
154
154
|
const packageJsonExists = await (0, file_1.exists)(packageJsonLocation);
|
|
@@ -163,3 +163,4 @@ async function updatePackageJsonWithBuild(localPath, localTmpPath) {
|
|
|
163
163
|
(0, logger_1.warn)(`Failed to add function build commands: ${packageJsonLocation} does not exist.`);
|
|
164
164
|
}
|
|
165
165
|
}
|
|
166
|
+
exports.updatePackageJsonWithBuild = updatePackageJsonWithBuild;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.create =
|
|
3
|
+
exports.create = void 0;
|
|
4
4
|
const path_1 = require("path");
|
|
5
5
|
const clone_1 = require("./clone");
|
|
6
6
|
async function create(settings) {
|
|
@@ -8,3 +8,4 @@ async function create(settings) {
|
|
|
8
8
|
await (0, clone_1.cloneFunction)(localPath, settings);
|
|
9
9
|
console.log(`Function "${settings.name}" created successfully`);
|
|
10
10
|
}
|
|
11
|
+
exports.create = create;
|
|
@@ -3,13 +3,20 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.getGithubFolderNames =
|
|
6
|
+
exports.getGithubFolderNames = void 0;
|
|
7
7
|
const constants_1 = require("./constants");
|
|
8
8
|
const axios_1 = __importDefault(require("axios"));
|
|
9
9
|
const types_1 = require("./types");
|
|
10
10
|
async function getGithubFolderNames() {
|
|
11
11
|
try {
|
|
12
|
-
const
|
|
12
|
+
const config = {};
|
|
13
|
+
const githubToken = process.env.GITHUB_TOKEN;
|
|
14
|
+
if (githubToken) {
|
|
15
|
+
config.headers = {
|
|
16
|
+
Authorization: `Bearer ${githubToken}`,
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
const response = await axios_1.default.get(constants_1.CONTENTFUL_FUNCTIONS_EXAMPLE_REPO_PATH, config);
|
|
13
20
|
const contents = response.data;
|
|
14
21
|
const filteredContents = contents.filter((content) => content.type === 'dir');
|
|
15
22
|
return filteredContents.map((content) => content.name);
|
|
@@ -23,3 +30,4 @@ async function getGithubFolderNames() {
|
|
|
23
30
|
}
|
|
24
31
|
}
|
|
25
32
|
}
|
|
33
|
+
exports.getGithubFolderNames = getGithubFolderNames;
|
|
@@ -3,18 +3,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.warn =
|
|
7
|
-
exports.error = error;
|
|
8
|
-
exports.wrapInBlanks = wrapInBlanks;
|
|
9
|
-
exports.highlight = highlight;
|
|
10
|
-
exports.choice = choice;
|
|
11
|
-
exports.success = success;
|
|
12
|
-
exports.code = code;
|
|
6
|
+
exports.code = exports.success = exports.choice = exports.highlight = exports.wrapInBlanks = exports.error = exports.warn = void 0;
|
|
13
7
|
const chalk_1 = __importDefault(require("chalk"));
|
|
14
8
|
const types_1 = require("./types");
|
|
15
9
|
function warn(message) {
|
|
16
10
|
console.log(`${chalk_1.default.yellow('Warning:')} ${message}`);
|
|
17
11
|
}
|
|
12
|
+
exports.warn = warn;
|
|
18
13
|
function error(message, error) {
|
|
19
14
|
console.log(`${chalk_1.default.red('Error:')} ${message}`);
|
|
20
15
|
if (error === undefined) {
|
|
@@ -35,20 +30,26 @@ function error(message, error) {
|
|
|
35
30
|
console.log(`${strigifiedError.startsWith('Error: ') ? strigifiedError.substring(7) : strigifiedError}`);
|
|
36
31
|
}
|
|
37
32
|
}
|
|
33
|
+
exports.error = error;
|
|
38
34
|
function wrapInBlanks(message) {
|
|
39
35
|
console.log(' ');
|
|
40
36
|
console.log(message);
|
|
41
37
|
console.log(' ');
|
|
42
38
|
}
|
|
39
|
+
exports.wrapInBlanks = wrapInBlanks;
|
|
43
40
|
function highlight(str) {
|
|
44
41
|
return chalk_1.default.bold(str);
|
|
45
42
|
}
|
|
43
|
+
exports.highlight = highlight;
|
|
46
44
|
function choice(str) {
|
|
47
45
|
return chalk_1.default.cyan(str);
|
|
48
46
|
}
|
|
47
|
+
exports.choice = choice;
|
|
49
48
|
function success(str) {
|
|
50
49
|
return chalk_1.default.greenBright(str);
|
|
51
50
|
}
|
|
51
|
+
exports.success = success;
|
|
52
52
|
function code(str) {
|
|
53
53
|
return chalk_1.default.bold(str);
|
|
54
54
|
}
|
|
55
|
+
exports.code = code;
|
|
@@ -3,10 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.getJsonData =
|
|
7
|
-
exports.mergeJsonIntoFile = mergeJsonIntoFile;
|
|
8
|
-
exports.exists = exists;
|
|
9
|
-
exports.whichExists = whichExists;
|
|
6
|
+
exports.whichExists = exports.exists = exports.mergeJsonIntoFile = exports.getJsonData = void 0;
|
|
10
7
|
const merge_options_1 = __importDefault(require("merge-options"));
|
|
11
8
|
const promises_1 = require("fs/promises");
|
|
12
9
|
const node_path_1 = require("node:path");
|
|
@@ -20,17 +17,20 @@ async function getJsonData(path) {
|
|
|
20
17
|
}
|
|
21
18
|
return JSON.parse(await (0, promises_1.readFile)(normalizedPath, { encoding: 'utf-8' }));
|
|
22
19
|
}
|
|
20
|
+
exports.getJsonData = getJsonData;
|
|
23
21
|
async function mergeJsonIntoFile({ source, destination, mergeFn = merge_options_1.default.bind({ concatArrays: false }), }) {
|
|
24
22
|
const sourceJson = await getJsonData(source);
|
|
25
23
|
const destinationJson = await getJsonData(destination);
|
|
26
24
|
const mergedJson = mergeFn(destinationJson, sourceJson);
|
|
27
25
|
await (0, promises_1.writeFile)((0, node_path_1.resolve)(destination), JSON.stringify(mergedJson, null, ' '));
|
|
28
26
|
}
|
|
27
|
+
exports.mergeJsonIntoFile = mergeJsonIntoFile;
|
|
29
28
|
function exists(path) {
|
|
30
29
|
return (0, promises_1.access)(path)
|
|
31
30
|
.then(() => true)
|
|
32
31
|
.catch(() => false);
|
|
33
32
|
}
|
|
33
|
+
exports.exists = exists;
|
|
34
34
|
/**
|
|
35
35
|
* Check a directory if two files exist, returning the first one that exists or "None"
|
|
36
36
|
* @param basePath Base path
|
|
@@ -49,3 +49,4 @@ async function whichExists(basePath, paths) {
|
|
|
49
49
|
}
|
|
50
50
|
return "None";
|
|
51
51
|
}
|
|
52
|
+
exports.whichExists = whichExists;
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.getAddBuildCommandFn =
|
|
6
|
+
exports.getAddBuildCommandFn = void 0;
|
|
7
7
|
const merge_options_1 = __importDefault(require("merge-options"));
|
|
8
8
|
function getAddBuildCommandFn({ name, command }) {
|
|
9
9
|
return (packageJson, additionalProperties) => {
|
|
@@ -21,3 +21,4 @@ function getAddBuildCommandFn({ name, command }) {
|
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
|
+
exports.getAddBuildCommandFn = getAddBuildCommandFn;
|
package/lib/get-app-info.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export declare const getAppInfo: ({ organizationId, definitionId, token, host, }: {
|
|
2
|
-
organizationId?: string;
|
|
3
|
-
definitionId?: string;
|
|
4
|
-
token?: string;
|
|
5
|
-
host?: string;
|
|
2
|
+
organizationId?: string | undefined;
|
|
3
|
+
definitionId?: string | undefined;
|
|
4
|
+
token?: string | undefined;
|
|
5
|
+
host?: string | undefined;
|
|
6
6
|
}) => Promise<{
|
|
7
7
|
accessToken: string;
|
|
8
8
|
organization: import("./organization-api").Organization;
|
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
5
|
};
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.getManagementToken =
|
|
7
|
+
exports.getManagementToken = void 0;
|
|
8
8
|
const chalk_1 = __importDefault(require("chalk"));
|
|
9
9
|
const open_1 = __importDefault(require("open"));
|
|
10
10
|
const inquirer_1 = __importDefault(require("inquirer"));
|
|
@@ -57,3 +57,4 @@ async function getManagementToken(host) {
|
|
|
57
57
|
await (0, cache_credential_1.cacheEnvVars)({ [constants_1.ACCESS_TOKEN_ENV_KEY]: mgmtToken });
|
|
58
58
|
return mgmtToken;
|
|
59
59
|
}
|
|
60
|
+
exports.getManagementToken = getManagementToken;
|
package/lib/install/install.js
CHANGED
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.installToEnvironment =
|
|
6
|
+
exports.installToEnvironment = void 0;
|
|
7
7
|
const open_1 = __importDefault(require("open"));
|
|
8
8
|
const chalk_1 = __importDefault(require("chalk"));
|
|
9
9
|
const inquirer_1 = __importDefault(require("inquirer"));
|
|
@@ -54,3 +54,4 @@ async function installToEnvironment(options) {
|
|
|
54
54
|
throw err;
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
|
+
exports.installToEnvironment = installToEnvironment;
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.openSettings =
|
|
6
|
+
exports.openSettings = void 0;
|
|
7
7
|
const open_1 = __importDefault(require("open"));
|
|
8
8
|
const chalk_1 = __importDefault(require("chalk"));
|
|
9
9
|
const inquirer_1 = __importDefault(require("inquirer"));
|
|
@@ -54,3 +54,4 @@ async function openSettings(options) {
|
|
|
54
54
|
throw err;
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
|
+
exports.openSettings = openSettings;
|
package/lib/organization-api.js
CHANGED
|
@@ -3,8 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.selectOrganization =
|
|
7
|
-
exports.getOrganizationById = getOrganizationById;
|
|
6
|
+
exports.getOrganizationById = exports.selectOrganization = void 0;
|
|
8
7
|
const ora_1 = __importDefault(require("ora"));
|
|
9
8
|
const utils_1 = require("./utils");
|
|
10
9
|
const constants_1 = require("./constants");
|
|
@@ -31,6 +30,7 @@ async function selectOrganization(client) {
|
|
|
31
30
|
orgSpinner.stop();
|
|
32
31
|
}
|
|
33
32
|
}
|
|
33
|
+
exports.selectOrganization = selectOrganization;
|
|
34
34
|
async function getOrganizationById(client, orgId) {
|
|
35
35
|
try {
|
|
36
36
|
const org = await client.getOrganization(orgId);
|
|
@@ -43,3 +43,4 @@ async function getOrganizationById(client, orgId) {
|
|
|
43
43
|
return (0, utils_1.throwError)(err, 'Could not fetch your organization. Make sure you provided a valid access token.');
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
+
exports.getOrganizationById = getOrganizationById;
|
package/lib/types.d.ts
CHANGED
|
@@ -3,8 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.buildAppUploadSettings =
|
|
7
|
-
exports.hostProtocolFilter = hostProtocolFilter;
|
|
6
|
+
exports.hostProtocolFilter = exports.buildAppUploadSettings = void 0;
|
|
8
7
|
const inquirer_1 = require("inquirer");
|
|
9
8
|
const get_app_info_1 = require("../get-app-info");
|
|
10
9
|
const utils_1 = require("../utils");
|
|
@@ -57,6 +56,8 @@ async function buildAppUploadSettings(options) {
|
|
|
57
56
|
...appInfo,
|
|
58
57
|
};
|
|
59
58
|
}
|
|
59
|
+
exports.buildAppUploadSettings = buildAppUploadSettings;
|
|
60
60
|
function hostProtocolFilter(input) {
|
|
61
61
|
return input.replace(/^https?:\/\//, '');
|
|
62
62
|
}
|
|
63
|
+
exports.hostProtocolFilter = hostProtocolFilter;
|
|
@@ -3,9 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.createAppBundleFromUpload =
|
|
7
|
-
exports.processCreateAppBundleError = processCreateAppBundleError;
|
|
8
|
-
exports.createAppBundleFromSettings = createAppBundleFromSettings;
|
|
6
|
+
exports.createAppBundleFromSettings = exports.processCreateAppBundleError = exports.createAppBundleFromUpload = void 0;
|
|
9
7
|
const chalk_1 = __importDefault(require("chalk"));
|
|
10
8
|
const ora_1 = __importDefault(require("ora"));
|
|
11
9
|
const utils_1 = require("../utils");
|
|
@@ -37,6 +35,7 @@ async function createAppBundleFromUpload(settings, appUploadId) {
|
|
|
37
35
|
bundleSpinner.stop();
|
|
38
36
|
return appBundle;
|
|
39
37
|
}
|
|
38
|
+
exports.createAppBundleFromUpload = createAppBundleFromUpload;
|
|
40
39
|
function processCreateAppBundleError(err) {
|
|
41
40
|
try {
|
|
42
41
|
const message = JSON.parse(err.message);
|
|
@@ -60,6 +59,7 @@ function processCreateAppBundleError(err) {
|
|
|
60
59
|
return err.message;
|
|
61
60
|
}
|
|
62
61
|
}
|
|
62
|
+
exports.processCreateAppBundleError = processCreateAppBundleError;
|
|
63
63
|
async function createAppBundleFromSettings(settings) {
|
|
64
64
|
let appUpload = null;
|
|
65
65
|
try {
|
|
@@ -99,3 +99,4 @@ async function createAppBundleFromSettings(settings) {
|
|
|
99
99
|
}
|
|
100
100
|
return appBundle;
|
|
101
101
|
}
|
|
102
|
+
exports.createAppBundleFromSettings = createAppBundleFromSettings;
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.createAppUpload =
|
|
6
|
+
exports.createAppUpload = void 0;
|
|
7
7
|
const ora_1 = __importDefault(require("ora"));
|
|
8
8
|
const create_zip_from_directory_1 = require("./create-zip-from-directory");
|
|
9
9
|
const validate_bundle_1 = require("./validate-bundle");
|
|
@@ -36,3 +36,4 @@ async function createAppUpload(settings) {
|
|
|
36
36
|
uploadSpinner.stop();
|
|
37
37
|
return appUpload;
|
|
38
38
|
}
|
|
39
|
+
exports.createAppUpload = createAppUpload;
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.createZipFileFromDirectory =
|
|
6
|
+
exports.createZipFileFromDirectory = void 0;
|
|
7
7
|
const chalk_1 = __importDefault(require("chalk"));
|
|
8
8
|
const adm_zip_1 = __importDefault(require("adm-zip"));
|
|
9
9
|
const utils_1 = require("../utils");
|
|
@@ -26,3 +26,4 @@ async function createZipFileFromDirectory(path) {
|
|
|
26
26
|
return null;
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
|
+
exports.createZipFileFromDirectory = createZipFileFromDirectory;
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.getUploadSettingsArgs =
|
|
6
|
+
exports.getUploadSettingsArgs = void 0;
|
|
7
7
|
const chalk_1 = __importDefault(require("chalk"));
|
|
8
8
|
const ora_1 = __importDefault(require("ora"));
|
|
9
9
|
const get_app_info_1 = require("../get-app-info");
|
|
@@ -44,3 +44,4 @@ async function getUploadSettingsArgs(options) {
|
|
|
44
44
|
validateSpinner.stop();
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
+
exports.getUploadSettingsArgs = getUploadSettingsArgs;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { UploadSettings } from '../types';
|
|
2
|
-
export declare const validateBundle: (path: string, { functions }: Pick<UploadSettings,
|
|
2
|
+
export declare const validateBundle: (path: string, { functions }: Pick<UploadSettings, 'functions'>) => void;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createAction =
|
|
4
|
-
exports.getExistingAction = getExistingAction;
|
|
5
|
-
exports.updateAction = updateAction;
|
|
3
|
+
exports.updateAction = exports.getExistingAction = exports.createAction = void 0;
|
|
6
4
|
const chalk_1 = require("chalk");
|
|
7
5
|
async function createAction(client, appDefinitionId, payload) {
|
|
8
6
|
const action = await client.appAction.create({
|
|
@@ -12,6 +10,7 @@ async function createAction(client, appDefinitionId, payload) {
|
|
|
12
10
|
${(0, chalk_1.cyan)('Success!')} Created Action ${(0, chalk_1.cyan)(action.name)} with ID ${(0, chalk_1.cyan)(action.sys.id)} for App ${(0, chalk_1.cyan)(appDefinitionId)}.`);
|
|
13
11
|
return action;
|
|
14
12
|
}
|
|
13
|
+
exports.createAction = createAction;
|
|
15
14
|
async function getExistingAction(client, appDefinitionId, appActionId) {
|
|
16
15
|
try {
|
|
17
16
|
return await client.appAction.get({
|
|
@@ -26,6 +25,7 @@ async function getExistingAction(client, appDefinitionId, appActionId) {
|
|
|
26
25
|
throw err;
|
|
27
26
|
}
|
|
28
27
|
}
|
|
28
|
+
exports.getExistingAction = getExistingAction;
|
|
29
29
|
async function updateAction(client, appDefinitionId, appActionId, payload) {
|
|
30
30
|
const action = await client.appAction.update({
|
|
31
31
|
appDefinitionId,
|
|
@@ -35,3 +35,4 @@ async function updateAction(client, appDefinitionId, appActionId, payload) {
|
|
|
35
35
|
${(0, chalk_1.cyan)('Success!')} Updated Action ${(0, chalk_1.cyan)(action.name)} with ID ${(0, chalk_1.cyan)(appActionId)} for App ${(0, chalk_1.cyan)(appDefinitionId)}.`);
|
|
36
36
|
return action;
|
|
37
37
|
}
|
|
38
|
+
exports.updateAction = updateAction;
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.getCreateAppActionsArgs =
|
|
6
|
+
exports.getCreateAppActionsArgs = void 0;
|
|
7
7
|
const chalk_1 = __importDefault(require("chalk"));
|
|
8
8
|
const ora_1 = __importDefault(require("ora"));
|
|
9
9
|
const get_app_info_1 = require("../get-app-info");
|
|
@@ -39,3 +39,4 @@ async function getCreateAppActionsArgs(settings) {
|
|
|
39
39
|
validateSpinner.stop();
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
+
exports.getCreateAppActionsArgs = getCreateAppActionsArgs;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.makeAppActionCMAPayload =
|
|
3
|
+
exports.makeAppActionCMAPayload = void 0;
|
|
4
4
|
function makeAppActionCMAPayload(action) {
|
|
5
5
|
const baseProps = {
|
|
6
6
|
name: action.name,
|
|
@@ -37,3 +37,4 @@ function makeAppActionCMAPayload(action) {
|
|
|
37
37
|
};
|
|
38
38
|
return payload;
|
|
39
39
|
}
|
|
40
|
+
exports.makeAppActionCMAPayload = makeAppActionCMAPayload;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.promptCreateAppAction =
|
|
3
|
+
exports.promptCreateAppAction = void 0;
|
|
4
4
|
const inquirer_1 = require("inquirer");
|
|
5
5
|
const constants_1 = require("../constants");
|
|
6
6
|
const get_app_info_1 = require("../get-app-info");
|
|
@@ -34,3 +34,4 @@ async function promptCreateAppAction(options) {
|
|
|
34
34
|
organizationId: appInfo.organization.value,
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
|
+
exports.promptCreateAppAction = promptCreateAppAction;
|
|
@@ -3,10 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.doUpsert =
|
|
7
|
-
exports.syncUpsertToManifest = syncUpsertToManifest;
|
|
8
|
-
exports.processActionManifests = processActionManifests;
|
|
9
|
-
exports.upsertAppActions = upsertAppActions;
|
|
6
|
+
exports.upsertAppActions = exports.processActionManifests = exports.syncUpsertToManifest = exports.doUpsert = void 0;
|
|
10
7
|
const chalk_1 = require("chalk");
|
|
11
8
|
const contentful_management_1 = require("contentful-management");
|
|
12
9
|
const node_fs_1 = __importDefault(require("node:fs"));
|
|
@@ -28,6 +25,7 @@ async function doUpsert(client, appDefinitionId, payload) {
|
|
|
28
25
|
}
|
|
29
26
|
return (0, client_1.createAction)(client, appDefinitionId, payload);
|
|
30
27
|
}
|
|
28
|
+
exports.doUpsert = doUpsert;
|
|
31
29
|
function syncUpsertToManifest(manifestActions, actionsToSync, manifest, manifestFile) {
|
|
32
30
|
const actions = manifestActions.map((action, i) => {
|
|
33
31
|
const syncedAction = actionsToSync[i];
|
|
@@ -36,6 +34,7 @@ function syncUpsertToManifest(manifestActions, actionsToSync, manifest, manifest
|
|
|
36
34
|
node_fs_1.default.writeFileSync(manifestFile, JSON.stringify({ ...manifest, actions }, null, 2));
|
|
37
35
|
console.log(`Remote updates synced to your manifest file at ${(0, chalk_1.yellow)(manifestFile)}.`);
|
|
38
36
|
}
|
|
37
|
+
exports.syncUpsertToManifest = syncUpsertToManifest;
|
|
39
38
|
async function processActionManifests(actions, doUpsert) {
|
|
40
39
|
const actionsToSync = {};
|
|
41
40
|
const errors = [];
|
|
@@ -55,6 +54,7 @@ async function processActionManifests(actions, doUpsert) {
|
|
|
55
54
|
}
|
|
56
55
|
return { actionsToSync, errors };
|
|
57
56
|
}
|
|
57
|
+
exports.processActionManifests = processActionManifests;
|
|
58
58
|
async function upsertAppActions(settings) {
|
|
59
59
|
const { accessToken, appDefinitionId, host, organizationId, manifestFile } = settings;
|
|
60
60
|
const manifest = await (0, utils_1.resolveManifestFile)({ manifestFile });
|
|
@@ -78,3 +78,4 @@ async function upsertAppActions(settings) {
|
|
|
78
78
|
}
|
|
79
79
|
spinner.stop();
|
|
80
80
|
}
|
|
81
|
+
exports.upsertAppActions = upsertAppActions;
|
|
@@ -3,8 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.validateId = void 0;
|
|
7
|
-
exports.validateActionsManifest = validateActionsManifest;
|
|
6
|
+
exports.validateActionsManifest = exports.validateId = void 0;
|
|
8
7
|
const zod_1 = __importDefault(require("zod"));
|
|
9
8
|
const utils_1 = require("../utils");
|
|
10
9
|
const parametersSchema = zod_1.default
|
|
@@ -75,3 +74,4 @@ function validateActionsManifest(manifest) {
|
|
|
75
74
|
}
|
|
76
75
|
return actions;
|
|
77
76
|
}
|
|
77
|
+
exports.validateActionsManifest = validateActionsManifest;
|
package/lib/utils.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export declare const isValidNetwork: (address: string) => boolean;
|
|
|
6
6
|
export declare const stripProtocol: (url: string) => string;
|
|
7
7
|
export declare const showCreationError: (subject: string, message: string) => void;
|
|
8
8
|
export declare const throwError: (err: Error, message: string) => never;
|
|
9
|
-
export declare const selectFromList: <T extends
|
|
9
|
+
export declare const selectFromList: <T extends Organization | Definition>(list: T[], message: string, cachedOptionEnvVar: string) => Promise<T>;
|
|
10
10
|
export declare function getFunctionsFromManifest(): Omit<ContentfulFunction, 'entryFile'>[] | undefined;
|
|
11
11
|
export declare function getWebAppHostname(host: string | undefined): string;
|
|
12
12
|
export declare const resolveManifestFile: (options: {
|
package/lib/utils.js
CHANGED
|
@@ -3,9 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.ID_REGEX = exports.resolveManifestFile = exports.selectFromList = exports.throwError = exports.showCreationError = exports.stripProtocol = exports.isValidNetwork = exports.throwValidationException = void 0;
|
|
7
|
-
exports.getFunctionsFromManifest = getFunctionsFromManifest;
|
|
8
|
-
exports.getWebAppHostname = getWebAppHostname;
|
|
6
|
+
exports.ID_REGEX = exports.resolveManifestFile = exports.getWebAppHostname = exports.getFunctionsFromManifest = exports.selectFromList = exports.throwError = exports.showCreationError = exports.stripProtocol = exports.isValidNetwork = exports.throwValidationException = void 0;
|
|
9
7
|
const node_fs_1 = __importDefault(require("node:fs"));
|
|
10
8
|
const chalk_1 = __importDefault(require("chalk"));
|
|
11
9
|
const inquirer_1 = __importDefault(require("inquirer"));
|
|
@@ -151,9 +149,11 @@ function getFunctionsFromManifest() {
|
|
|
151
149
|
process.exit(1);
|
|
152
150
|
}
|
|
153
151
|
}
|
|
152
|
+
exports.getFunctionsFromManifest = getFunctionsFromManifest;
|
|
154
153
|
function getWebAppHostname(host) {
|
|
155
154
|
return host && host.includes('api') ? host.replace('api', 'app') : constants_1.DEFAULT_CONTENTFUL_APP_HOST;
|
|
156
155
|
}
|
|
156
|
+
exports.getWebAppHostname = getWebAppHostname;
|
|
157
157
|
const resolveManifestFile = (options, cwd = process.cwd()) => {
|
|
158
158
|
const manifestPath = options.manifestFile
|
|
159
159
|
? (0, node_path_1.resolve)(cwd, options.manifestFile)
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.validateArguments =
|
|
6
|
+
exports.validateArguments = void 0;
|
|
7
7
|
const chalk_1 = __importDefault(require("chalk"));
|
|
8
8
|
function validateArguments(requiredOptions, options, command) {
|
|
9
9
|
Object.entries(requiredOptions).forEach(([option, argument]) => {
|
|
@@ -20,3 +20,4 @@ function validateArguments(requiredOptions, options, command) {
|
|
|
20
20
|
}
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
|
+
exports.validateArguments = validateArguments;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/app-scripts",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.8",
|
|
4
4
|
"description": "A collection of scripts for building Contentful Apps",
|
|
5
5
|
"author": "Contentful GmbH",
|
|
6
6
|
"license": "MIT",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"test": "ts-mocha \"./{,!(node_modules)/**/}*.test.ts\"",
|
|
32
32
|
"test:watch": "npm t -- --watch",
|
|
33
33
|
"pre-commit": "lint-staged",
|
|
34
|
-
"build": "
|
|
34
|
+
"build": "rimraf lib && tsc"
|
|
35
35
|
},
|
|
36
36
|
"bugs": {
|
|
37
37
|
"url": "https://github.com/contentful/create-contentful-app/issues"
|
|
@@ -56,10 +56,10 @@
|
|
|
56
56
|
"chalk": "4.1.2",
|
|
57
57
|
"commander": "12.1.0",
|
|
58
58
|
"contentful-management": "^11.48.1",
|
|
59
|
-
"dotenv": "
|
|
60
|
-
"esbuild": "^0.
|
|
59
|
+
"dotenv": "17.2.2",
|
|
60
|
+
"esbuild": "^0.27.0",
|
|
61
61
|
"ignore": "7.0.5",
|
|
62
|
-
"inquirer": "8.2.
|
|
62
|
+
"inquirer": "8.2.7",
|
|
63
63
|
"lodash": "4.17.21",
|
|
64
64
|
"merge-options": "^3.0.4",
|
|
65
65
|
"open": "8.4.2",
|
|
@@ -67,21 +67,22 @@
|
|
|
67
67
|
"tiged": "^2.12.7",
|
|
68
68
|
"zod": "^3.24.1"
|
|
69
69
|
},
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "4c3506be3f52c7a8aae17deaa75acefc9a805b42",
|
|
71
71
|
"devDependencies": {
|
|
72
72
|
"@types/adm-zip": "0.5.7",
|
|
73
73
|
"@types/analytics-node": "3.1.14",
|
|
74
74
|
"@types/chai": "4.3.16",
|
|
75
75
|
"@types/inquirer": "8.2.1",
|
|
76
|
-
"@types/lodash": "4.17.
|
|
76
|
+
"@types/lodash": "4.17.21",
|
|
77
77
|
"@types/mocha": "10.0.10",
|
|
78
78
|
"@types/node": "^22.13.10",
|
|
79
79
|
"@types/proxyquire": "1.3.31",
|
|
80
|
-
"@types/sinon": "
|
|
80
|
+
"@types/sinon": "21.0.0",
|
|
81
81
|
"chai": "4.5.0",
|
|
82
|
-
"mocha": "11.
|
|
82
|
+
"mocha": "11.7.5",
|
|
83
83
|
"proxyquire": "2.1.3",
|
|
84
|
-
"
|
|
84
|
+
"rimraf": "5.0.8",
|
|
85
|
+
"sinon": "21.0.1",
|
|
85
86
|
"ts-mocha": "11.1.0",
|
|
86
87
|
"ts-node": "10.9.2"
|
|
87
88
|
}
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
The MIT License (MIT)
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2020 Contentful
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|