@contentful/app-scripts 2.5.6 → 2.5.10-alpha.0
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/analytics.d.ts
CHANGED
package/lib/analytics.js
CHANGED
|
@@ -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
|
}
|
|
@@ -31,6 +31,7 @@ function track({ command, ci }) {
|
|
|
31
31
|
anonymousId: Date.now().toString(), // generate a random id
|
|
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) {
|
package/lib/bin.js
CHANGED
|
@@ -115,8 +115,8 @@ async function runCommand(command, options) {
|
|
|
115
115
|
.action(async (options) => {
|
|
116
116
|
await runCommand(index_1.addLocations, options);
|
|
117
117
|
});
|
|
118
|
-
commander_1.program.hook('preAction', (thisCommand) => {
|
|
119
|
-
(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 });
|
|
120
120
|
});
|
|
121
121
|
await commander_1.program.parseAsync(process.argv);
|
|
122
122
|
})().catch((e) => {
|
|
@@ -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
|
})[];
|
|
@@ -9,7 +9,14 @@ 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);
|
|
@@ -37,7 +37,7 @@ async function getManagementToken(host) {
|
|
|
37
37
|
(0, open_1.default)(oauthUrl);
|
|
38
38
|
}
|
|
39
39
|
catch (err) {
|
|
40
|
-
console.log(`${chalk_1.default.red('Error:')} Failed to open browser
|
|
40
|
+
console.log(`${chalk_1.default.red('Error:')} Failed to open browser.`);
|
|
41
41
|
console.log(err.message);
|
|
42
42
|
throw err;
|
|
43
43
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/app-scripts",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.10-alpha.0",
|
|
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"
|
|
@@ -44,7 +44,8 @@
|
|
|
44
44
|
"lib"
|
|
45
45
|
],
|
|
46
46
|
"publishConfig": {
|
|
47
|
-
"access": "public"
|
|
47
|
+
"access": "public",
|
|
48
|
+
"registry": "https://npm.pkg.github.com/"
|
|
48
49
|
},
|
|
49
50
|
"dependencies": {
|
|
50
51
|
"@esbuild-plugins/node-globals-polyfill": "^0.2.3",
|
|
@@ -57,7 +58,7 @@
|
|
|
57
58
|
"commander": "12.1.0",
|
|
58
59
|
"contentful-management": "^11.48.1",
|
|
59
60
|
"dotenv": "17.2.2",
|
|
60
|
-
"esbuild": "^0.
|
|
61
|
+
"esbuild": "^0.27.0",
|
|
61
62
|
"ignore": "7.0.5",
|
|
62
63
|
"inquirer": "8.2.7",
|
|
63
64
|
"lodash": "4.17.21",
|
|
@@ -67,21 +68,22 @@
|
|
|
67
68
|
"tiged": "^2.12.7",
|
|
68
69
|
"zod": "^3.24.1"
|
|
69
70
|
},
|
|
70
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "83eea204b666977602cb680d5e5913864aa6dcc1",
|
|
71
72
|
"devDependencies": {
|
|
72
73
|
"@types/adm-zip": "0.5.7",
|
|
73
74
|
"@types/analytics-node": "3.1.14",
|
|
74
75
|
"@types/chai": "4.3.16",
|
|
75
76
|
"@types/inquirer": "8.2.1",
|
|
76
|
-
"@types/lodash": "4.17.
|
|
77
|
+
"@types/lodash": "4.17.21",
|
|
77
78
|
"@types/mocha": "10.0.10",
|
|
78
79
|
"@types/node": "^22.13.10",
|
|
79
80
|
"@types/proxyquire": "1.3.31",
|
|
80
|
-
"@types/sinon": "
|
|
81
|
+
"@types/sinon": "21.0.0",
|
|
81
82
|
"chai": "4.5.0",
|
|
82
|
-
"mocha": "11.7.
|
|
83
|
+
"mocha": "11.7.5",
|
|
83
84
|
"proxyquire": "2.1.3",
|
|
84
|
-
"
|
|
85
|
+
"rimraf": "5.0.8",
|
|
86
|
+
"sinon": "21.0.1",
|
|
85
87
|
"ts-mocha": "11.1.0",
|
|
86
88
|
"ts-node": "10.9.2"
|
|
87
89
|
}
|