@drupal-canvas/cli 0.6.1 → 0.6.2
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/dist/index.js +7 -9
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -25,7 +25,7 @@ import { parse } from '@babel/parser';
|
|
|
25
25
|
|
|
26
26
|
// package.json
|
|
27
27
|
var package_default = {
|
|
28
|
-
};
|
|
28
|
+
version: "0.6.2"};
|
|
29
29
|
function loadEnvFiles() {
|
|
30
30
|
const homeDir = process.env.HOME || process.env.USERPROFILE || "";
|
|
31
31
|
if (homeDir) {
|
|
@@ -10919,7 +10919,7 @@ async function directoryExists(dirPath) {
|
|
|
10919
10919
|
async function downloadGlobalCssInBackground() {
|
|
10920
10920
|
const apiService = await createApiService();
|
|
10921
10921
|
const globalAssetLibrary = await apiService.getGlobalAssetLibrary();
|
|
10922
|
-
return globalAssetLibrary
|
|
10922
|
+
return globalAssetLibrary?.css?.original || "";
|
|
10923
10923
|
}
|
|
10924
10924
|
async function getGlobalCss(useLocal = true) {
|
|
10925
10925
|
const config2 = getConfig();
|
|
@@ -10983,7 +10983,7 @@ async function buildTailwindForComponents(selectedComponents, useLocalGlobalCss
|
|
|
10983
10983
|
const onlineComponents = await apiService.listComponents();
|
|
10984
10984
|
const globalSourceCodeCss = await getGlobalCss(useLocalGlobalCss);
|
|
10985
10985
|
const globalAssetLibrary = await apiService.getGlobalAssetLibrary();
|
|
10986
|
-
const globalSourceCodeJs = globalAssetLibrary
|
|
10986
|
+
const globalSourceCodeJs = globalAssetLibrary?.js?.original || "";
|
|
10987
10987
|
const distDir = path3.join(config2.componentDir, "dist");
|
|
10988
10988
|
await promises.mkdir(distDir, { recursive: true });
|
|
10989
10989
|
const targetFile = path3.join(distDir, "index.js");
|
|
@@ -18214,10 +18214,8 @@ function downloadCommand(program2) {
|
|
|
18214
18214
|
const s = p.spinner();
|
|
18215
18215
|
if (options.cssOnly) {
|
|
18216
18216
|
s.start("Fetching global CSS");
|
|
18217
|
-
const
|
|
18218
|
-
|
|
18219
|
-
} = await apiService.getGlobalAssetLibrary();
|
|
18220
|
-
globalCss = original;
|
|
18217
|
+
const globalAssetLibrary = await apiService.getGlobalAssetLibrary();
|
|
18218
|
+
globalCss = globalAssetLibrary?.css?.original || "";
|
|
18221
18219
|
s.stop("Global CSS fetched");
|
|
18222
18220
|
} else {
|
|
18223
18221
|
s.start("Fetching components and global CSS");
|
|
@@ -18226,7 +18224,7 @@ function downloadCommand(program2) {
|
|
|
18226
18224
|
apiService.getGlobalAssetLibrary()
|
|
18227
18225
|
]);
|
|
18228
18226
|
components = fetchedComponents;
|
|
18229
|
-
globalCss = globalAssetLibrary
|
|
18227
|
+
globalCss = globalAssetLibrary?.css?.original || "";
|
|
18230
18228
|
if (Object.keys(components).length === 0) {
|
|
18231
18229
|
s.stop("No components found");
|
|
18232
18230
|
p.outro("Download cancelled - no components were found");
|
|
@@ -19090,7 +19088,7 @@ function validateCommand(program2) {
|
|
|
19090
19088
|
// src/index.ts
|
|
19091
19089
|
var version = package_default.version;
|
|
19092
19090
|
var program = new Command();
|
|
19093
|
-
program.name("canvas").description("CLI tool for managing Drupal Canvas code components").version(version
|
|
19091
|
+
program.name("canvas").description("CLI tool for managing Drupal Canvas code components").version(version);
|
|
19094
19092
|
downloadCommand(program);
|
|
19095
19093
|
scaffoldCommand(program);
|
|
19096
19094
|
uploadCommand(program);
|