@nx/nuxt 22.7.0-beta.1 → 22.7.0-beta.11
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/nuxt",
|
|
3
|
-
"version": "22.7.0-beta.
|
|
3
|
+
"version": "22.7.0-beta.11",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The Nuxt plugin for Nx contains executors and generators for managing Nuxt applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Vitest, Playwright, Cypress, and Storybook.\n\n- Generators for applications, libraries, and more.\n\n- Library build support for publishing packages to npm or other registries.\n\n- Utilities for automatic workspace refactoring.",
|
|
6
6
|
"repository": {
|
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
"Front-end"
|
|
17
17
|
],
|
|
18
18
|
"main": "./index.js",
|
|
19
|
-
"
|
|
19
|
+
"type": "commonjs",
|
|
20
|
+
"types": "./index.d.ts",
|
|
20
21
|
"author": "Victor Savkin",
|
|
21
22
|
"license": "MIT",
|
|
22
23
|
"bugs": {
|
|
@@ -44,23 +45,21 @@
|
|
|
44
45
|
"dependencies": {
|
|
45
46
|
"tslib": "^2.3.0",
|
|
46
47
|
"@nuxt/kit": "^3.10.0 || ^4.0.0",
|
|
47
|
-
"@nx/devkit": "22.7.0-beta.
|
|
48
|
-
"@nx/js": "22.7.0-beta.
|
|
49
|
-
"@nx/eslint": "22.7.0-beta.
|
|
50
|
-
"@nx/vue": "22.7.0-beta.
|
|
51
|
-
"@nx/vite": "22.7.0-beta.
|
|
52
|
-
"@nx/vitest": "22.7.0-beta.
|
|
48
|
+
"@nx/devkit": "22.7.0-beta.11",
|
|
49
|
+
"@nx/js": "22.7.0-beta.11",
|
|
50
|
+
"@nx/eslint": "22.7.0-beta.11",
|
|
51
|
+
"@nx/vue": "22.7.0-beta.11",
|
|
52
|
+
"@nx/vite": "22.7.0-beta.11",
|
|
53
|
+
"@nx/vitest": "22.7.0-beta.11",
|
|
53
54
|
"semver": "^7.5.3"
|
|
54
55
|
},
|
|
55
56
|
"devDependencies": {
|
|
56
|
-
"nx": "22.7.0-beta.
|
|
57
|
+
"nx": "22.7.0-beta.11"
|
|
57
58
|
},
|
|
58
59
|
"peerDependencies": {
|
|
59
60
|
"@nuxt/schema": "^3.10.0 || ^4.0.0"
|
|
60
61
|
},
|
|
61
62
|
"publishConfig": {
|
|
62
63
|
"access": "public"
|
|
63
|
-
}
|
|
64
|
-
"types": "./index.d.ts",
|
|
65
|
-
"type": "commonjs"
|
|
64
|
+
}
|
|
66
65
|
}
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.applicationGenerator = applicationGenerator;
|
|
4
4
|
exports.applicationGeneratorInternal = applicationGeneratorInternal;
|
|
5
|
+
const tslib_1 = require("tslib");
|
|
5
6
|
const devkit_1 = require("@nx/devkit");
|
|
6
|
-
const init_1 = require("../init/init");
|
|
7
|
+
const init_1 = tslib_1.__importDefault(require("../init/init"));
|
|
7
8
|
const normalize_options_1 = require("./lib/normalize-options");
|
|
8
9
|
const create_ts_config_1 = require("../../utils/create-ts-config");
|
|
9
10
|
const js_1 = require("@nx/js");
|
|
@@ -154,7 +155,7 @@ async function applicationGeneratorInternal(tree, schema) {
|
|
|
154
155
|
try {
|
|
155
156
|
(0, node_child_process_1.execSync)(`npx -y nuxi prepare`, {
|
|
156
157
|
cwd: options.appProjectRoot,
|
|
157
|
-
windowsHide:
|
|
158
|
+
windowsHide: true,
|
|
158
159
|
});
|
|
159
160
|
}
|
|
160
161
|
catch (e) {
|
|
@@ -1,4 +1,37 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
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
|
+
})();
|
|
2
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
36
|
exports.addVitest = addVitest;
|
|
4
37
|
const devkit_1 = require("@nx/devkit");
|
|
@@ -12,7 +45,7 @@ async function addVitest(tree, options) {
|
|
|
12
45
|
: p.plugin === '@nx/nuxt/plugin');
|
|
13
46
|
const { createOrEditViteConfig } = (0, devkit_1.ensurePackage)('@nx/vite', versions_1.nxVersion);
|
|
14
47
|
(0, devkit_1.ensurePackage)('@nx/vitest', versions_1.nxVersion);
|
|
15
|
-
const { configurationGenerator } = await Promise.resolve().then(() => require('@nx/vitest/generators'));
|
|
48
|
+
const { configurationGenerator } = await Promise.resolve().then(() => __importStar(require('@nx/vitest/generators')));
|
|
16
49
|
const vitestTask = await configurationGenerator(tree, {
|
|
17
50
|
project: options.projectName,
|
|
18
51
|
uiFramework: 'none',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../../packages/nuxt/src/plugins/plugin.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,aAAa,
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../../packages/nuxt/src/plugins/plugin.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,aAAa,EAQd,MAAM,YAAY,CAAC;AA6BpB,MAAM,WAAW,iBAAiB;IAChC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED,eAAO,MAAM,WAAW,EAAE,aAAa,CAAC,iBAAiB,CAaxD,CAAC;AAEF,eAAO,MAAM,aAAa,kCAAc,CAAC"}
|
package/src/plugins/plugin.js
CHANGED
|
@@ -13,7 +13,6 @@ const executor_utils_1 = require("../utils/executor-utils");
|
|
|
13
13
|
const util_1 = require("@nx/js/src/plugins/typescript/util");
|
|
14
14
|
const cachePath = (0, path_1.join)(cache_directory_1.workspaceDataDirectory, 'nuxt.hash');
|
|
15
15
|
const targetsCache = readTargetsCache();
|
|
16
|
-
const pmc = (0, devkit_1.getPackageManagerCommand)();
|
|
17
16
|
function readTargetsCache() {
|
|
18
17
|
return (0, fs_1.existsSync)(cachePath) ? (0, devkit_1.readJsonFile)(cachePath) : {};
|
|
19
18
|
}
|
|
@@ -43,8 +42,9 @@ async function createNodesInternal(configFilePath, options, context) {
|
|
|
43
42
|
return {};
|
|
44
43
|
}
|
|
45
44
|
options = normalizeOptions(options);
|
|
45
|
+
const pmc = (0, devkit_1.getPackageManagerCommand)((0, devkit_1.detectPackageManager)(context.workspaceRoot));
|
|
46
46
|
const hash = await (0, calculate_hash_for_create_nodes_1.calculateHashForCreateNodes)(projectRoot, options, context, [(0, js_1.getLockFileName)((0, devkit_1.detectPackageManager)(context.workspaceRoot))]);
|
|
47
|
-
targetsCache[hash] ??= await buildNuxtTargets(configFilePath, projectRoot, options, context);
|
|
47
|
+
targetsCache[hash] ??= await buildNuxtTargets(configFilePath, projectRoot, options, context, pmc);
|
|
48
48
|
return {
|
|
49
49
|
projects: {
|
|
50
50
|
[projectRoot]: {
|
|
@@ -54,7 +54,7 @@ async function createNodesInternal(configFilePath, options, context) {
|
|
|
54
54
|
},
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
|
-
async function buildNuxtTargets(configFilePath, projectRoot, options, context) {
|
|
57
|
+
async function buildNuxtTargets(configFilePath, projectRoot, options, context, pmc) {
|
|
58
58
|
const nuxtConfig = await getInfoFromNuxtConfig(configFilePath, context, projectRoot);
|
|
59
59
|
const { buildOutputs } = getOutputs(nuxtConfig, projectRoot);
|
|
60
60
|
const namedInputs = (0, get_named_inputs_1.getNamedInputs)(projectRoot, context);
|
|
@@ -164,10 +164,10 @@ function normalizeOutputPath(outputPath, projectRoot) {
|
|
|
164
164
|
}
|
|
165
165
|
else {
|
|
166
166
|
if (outputPath.startsWith('..')) {
|
|
167
|
-
return (0,
|
|
167
|
+
return (0, devkit_1.joinPathFragments)('{workspaceRoot}', projectRoot, outputPath);
|
|
168
168
|
}
|
|
169
169
|
else {
|
|
170
|
-
return (0,
|
|
170
|
+
return (0, devkit_1.joinPathFragments)('{projectRoot}', outputPath);
|
|
171
171
|
}
|
|
172
172
|
}
|
|
173
173
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createTsConfig = createTsConfig;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
4
5
|
const devkit_1 = require("@nx/devkit");
|
|
5
|
-
const shared = require("@nx/js/src/utils/typescript/create-ts-config");
|
|
6
|
+
const shared = tslib_1.__importStar(require("@nx/js/src/utils/typescript/create-ts-config"));
|
|
6
7
|
function createTsConfig(host, options, relativePathToRootTsConfig) {
|
|
7
8
|
createAppTsConfig(host, options);
|
|
8
9
|
const json = {
|
package/project.json
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "nuxt",
|
|
3
|
-
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
|
4
|
-
"sourceRoot": "packages/nuxt",
|
|
5
|
-
"projectType": "library",
|
|
6
|
-
"targets": {
|
|
7
|
-
"build": {
|
|
8
|
-
"outputs": ["{workspaceRoot}/dist/packages/nuxt/README.md"],
|
|
9
|
-
"command": "node ./scripts/copy-readme.js nuxt"
|
|
10
|
-
},
|
|
11
|
-
"legacy-post-build": {
|
|
12
|
-
"executor": "@nx/workspace-plugin:legacy-post-build",
|
|
13
|
-
"options": {
|
|
14
|
-
"tsConfig": "./tsconfig.lib.json",
|
|
15
|
-
"assets": [
|
|
16
|
-
{
|
|
17
|
-
"input": "packages/nuxt",
|
|
18
|
-
"glob": "**/files/**",
|
|
19
|
-
"output": "/"
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
"input": "packages/nuxt",
|
|
23
|
-
"glob": "**/files/**/.gitkeep",
|
|
24
|
-
"output": "/"
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
"input": "packages/nuxt",
|
|
28
|
-
"glob": "**/*.json",
|
|
29
|
-
"ignore": ["**/tsconfig*.json", "project.json", ".eslintrc.json"],
|
|
30
|
-
"output": "/"
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
"input": "packages/nuxt",
|
|
34
|
-
"glob": "**/*.js",
|
|
35
|
-
"ignore": ["**/jest.config.js"],
|
|
36
|
-
"output": "/"
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
"input": "packages/nuxt",
|
|
40
|
-
"glob": "**/*.d.ts",
|
|
41
|
-
"output": "/"
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
"input": "",
|
|
45
|
-
"glob": "LICENSE",
|
|
46
|
-
"output": "/"
|
|
47
|
-
}
|
|
48
|
-
]
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|