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 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
- - `TARGET_DIRECTUS_URL`: Equivalent to `--directusUrl`
228
- - `TARGET_DIRECTUS_TOKEN`: Equivalent to `--directusToken`
229
- - `TARGET_DIRECTUS_EMAIL`: Equivalent to `--userEmail`
230
- - `TARGET_DIRECTUS_PASSWORD`: Equivalent to `--userPassword`
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
- - `SOURCE_DIRECTUS_URL`: Equivalent to `--directusUrl`
299
- - `SOURCE_DIRECTUS_TOKEN`: Equivalent to `--directusToken`
300
- - `SOURCE_DIRECTUS_EMAIL`: Equivalent to `--userEmail`
301
- - `SOURCE_DIRECTUS_PASSWORD`: Equivalent to `--userPassword`
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
@@ -291,7 +291,7 @@ export default class ApplyCommand extends BaseCommand {
291
291
  // log.warn(BSL_LICENSE_HEADLINE)
292
292
  // log.info(BSL_LICENSE_TEXT)
293
293
  // log.info(BSL_LICENSE_CTA)
294
- // ux.exit(0)
294
+ ux.exit(0);
295
295
  }
296
296
  /**
297
297
  * INTERACTIVE
@@ -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) {
@@ -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');
@@ -395,5 +395,5 @@
395
395
  ]
396
396
  }
397
397
  },
398
- "version": "0.7.2"
398
+ "version": "0.7.3"
399
399
  }
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "directus-template-cli",
3
- "version": "0.7.2",
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-community/directus-template-cli",
10
+ "homepage": "https://github.com/directus-labs/directus-template-cli",
11
11
  "license": "MIT",
12
12
  "main": "dist/index.js",
13
- "repository": "directus-community/directus-template-cli",
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-community/directus-template-cli/issues",
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
- "packageManager": "pnpm@9.15.4+sha512.b2dc20e2fc72b3e18848459b37359a32064663e5627a51e4c74b2c29dd8e8e0491483c3abb40789cfd578bf362fb6ba8261b05f0387d76792ed6e23ea3b1b6a0"
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
+ }