directus-template-cli 0.7.2 → 0.7.3
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/README.md +8 -8
- package/bin/dev.js +0 -0
- package/dist/commands/apply.js +1 -1
- package/dist/lib/load/load-files.js +2 -0
- package/dist/lib/sdk.js +1 -1
- package/dist/services/posthog.js +1 -1
- package/oclif.manifest.json +1 -1
- package/package.json +13 -16
package/README.md
CHANGED
|
@@ -224,10 +224,10 @@ If you use `--no-` flags, be cautious about excluding dependencies. For instance
|
|
|
224
224
|
|
|
225
225
|
You can also pass flags as environment variables. This can be useful for CI/CD pipelines or when you want to avoid exposing sensitive information in command-line arguments. Here are the available environment variables:
|
|
226
226
|
|
|
227
|
-
- `
|
|
228
|
-
- `
|
|
229
|
-
- `
|
|
230
|
-
- `
|
|
227
|
+
- `DIRECTUS_URL`: Equivalent to `--directusUrl`
|
|
228
|
+
- `DIRECTUS_TOKEN`: Equivalent to `--directusToken`
|
|
229
|
+
- `DIRECTUS_EMAIL`: Equivalent to `--userEmail`
|
|
230
|
+
- `DIRECTUS_PASSWORD`: Equivalent to `--userPassword`
|
|
231
231
|
- `TEMPLATE_LOCATION`: Equivalent to `--templateLocation`
|
|
232
232
|
- `TEMPLATE_TYPE`: Equivalent to `--templateType`
|
|
233
233
|
|
|
@@ -295,10 +295,10 @@ Available flags:
|
|
|
295
295
|
|
|
296
296
|
Similar to the Apply command, you can use environment variables for the Extract command as well:
|
|
297
297
|
|
|
298
|
-
- `
|
|
299
|
-
- `
|
|
300
|
-
- `
|
|
301
|
-
- `
|
|
298
|
+
- `DIRECTUS_URL`: Equivalent to `--directusUrl`
|
|
299
|
+
- `DIRECTUS_TOKEN`: Equivalent to `--directusToken`
|
|
300
|
+
- `DIRECTUS_EMAIL`: Equivalent to `--userEmail`
|
|
301
|
+
- `DIRECTUS_PASSWORD`: Equivalent to `--userPassword`
|
|
302
302
|
- `TEMPLATE_LOCATION`: Equivalent to `--templateLocation`
|
|
303
303
|
|
|
304
304
|
## Logs
|
package/bin/dev.js
CHANGED
|
File without changes
|
package/dist/commands/apply.js
CHANGED
|
@@ -40,6 +40,8 @@ export default async function loadFiles(dir) {
|
|
|
40
40
|
form.append('description', asset.description);
|
|
41
41
|
if (asset.folder)
|
|
42
42
|
form.append('folder', asset.folder);
|
|
43
|
+
if (asset.type)
|
|
44
|
+
form.append('type', asset.type);
|
|
43
45
|
form.append('file', fileStream, fileName);
|
|
44
46
|
try {
|
|
45
47
|
await api.client.request(uploadFiles(form));
|
package/dist/lib/sdk.js
CHANGED
|
@@ -122,7 +122,7 @@ class Api {
|
|
|
122
122
|
if (!this.client) {
|
|
123
123
|
throw new Error('API client is not initialized. Call initialize() first.');
|
|
124
124
|
}
|
|
125
|
-
await this.client.login(email, password);
|
|
125
|
+
await this.client.login({ email, password });
|
|
126
126
|
}
|
|
127
127
|
async loginWithToken(token) {
|
|
128
128
|
if (!this.client) {
|
package/dist/services/posthog.js
CHANGED
|
@@ -79,7 +79,7 @@ export function track({ lifecycle, distinctId, command, flags, runId, message, c
|
|
|
79
79
|
phClient.capture({
|
|
80
80
|
distinctId,
|
|
81
81
|
event: `directus_template_cli.${command}.${lifecycle}`,
|
|
82
|
-
properties: eventProperties
|
|
82
|
+
properties: { eventProperties }
|
|
83
83
|
});
|
|
84
84
|
if (debug)
|
|
85
85
|
ux.stdout('Event tracked successfully');
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "directus-template-cli",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.3",
|
|
4
4
|
"description": "CLI Utility for applying templates to a Directus instance.",
|
|
5
5
|
"author": "bryantgillespie @bryantgillespie",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"bin": {
|
|
8
8
|
"directus-template-cli": "./bin/run.js"
|
|
9
9
|
},
|
|
10
|
-
"homepage": "https://github.com/directus-
|
|
10
|
+
"homepage": "https://github.com/directus-labs/directus-template-cli",
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"main": "dist/index.js",
|
|
13
|
-
"repository": "directus-
|
|
13
|
+
"repository": "directus-labs/directus-template-cli",
|
|
14
14
|
"files": [
|
|
15
15
|
"/bin",
|
|
16
16
|
"/dist",
|
|
@@ -71,20 +71,10 @@
|
|
|
71
71
|
"topics": {},
|
|
72
72
|
"hooks": {}
|
|
73
73
|
},
|
|
74
|
-
"scripts": {
|
|
75
|
-
"build": "shx rm -rf dist && tsc -b",
|
|
76
|
-
"lint": "eslint . --ext .ts --config .eslintrc",
|
|
77
|
-
"postpack": "shx rm -f oclif.manifest.json",
|
|
78
|
-
"posttest": "pnpm run lint",
|
|
79
|
-
"prepack": "pnpm run build && oclif manifest && oclif readme",
|
|
80
|
-
"test": "mocha --forbid-only \"test/**/*.test.ts\"",
|
|
81
|
-
"version": "oclif readme && git add README.md",
|
|
82
|
-
"run": "./bin/run.js"
|
|
83
|
-
},
|
|
84
74
|
"engines": {
|
|
85
75
|
"node": ">=18.0.0"
|
|
86
76
|
},
|
|
87
|
-
"bugs": "https://github.com/directus-
|
|
77
|
+
"bugs": "https://github.com/directus-labs/directus-template-cli/issues",
|
|
88
78
|
"keywords": [
|
|
89
79
|
"directus",
|
|
90
80
|
"templates",
|
|
@@ -93,5 +83,12 @@
|
|
|
93
83
|
"directus cli"
|
|
94
84
|
],
|
|
95
85
|
"types": "dist/index.d.ts",
|
|
96
|
-
"
|
|
97
|
-
|
|
86
|
+
"scripts": {
|
|
87
|
+
"build": "shx rm -rf dist && tsc -b",
|
|
88
|
+
"lint": "eslint . --ext .ts --config .eslintrc",
|
|
89
|
+
"posttest": "pnpm run lint",
|
|
90
|
+
"test": "mocha --forbid-only \"test/**/*.test.ts\"",
|
|
91
|
+
"version": "oclif readme && git add README.md",
|
|
92
|
+
"run": "./bin/run.js"
|
|
93
|
+
}
|
|
94
|
+
}
|