@pinegrow/astro-module 3.0.0-beta.85 → 3.0.0-beta.87
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/chunk-4NKIVEY7.cjs +7 -0
- package/dist/index.cjs +26 -6
- package/dist/index.js +25 -5
- package/dist/live-designer-CPSOFW56.cjs +8 -0
- package/package.json +5 -4
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});// ../../node_modules/tsup/assets/cjs_shims.js
|
|
2
|
+
var getImportMetaUrl = () => typeof document === "undefined" ? new URL("file:" + __filename).href : document.currentScript && document.currentScript.src || new URL("main.js", document.baseURI).href;
|
|
3
|
+
var importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
exports.importMetaUrl = importMetaUrl;
|
package/dist/index.cjs
CHANGED
|
@@ -1,28 +1,42 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true})
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }// src/index.ts
|
|
2
2
|
var _vite = require('vite');
|
|
3
|
+
var _vite3 = require('unplugin-vue-components/vite'); var _vite4 = _interopRequireDefault(_vite3);
|
|
4
|
+
var _path = require('path'); var _path2 = _interopRequireDefault(_path);
|
|
3
5
|
async function getViteConfiguration(moduleOptions) {
|
|
4
|
-
var _a, _b;
|
|
6
|
+
var _a, _b, _c, _d;
|
|
5
7
|
let vitePlugin;
|
|
6
8
|
try {
|
|
7
9
|
const { liveDesigner } = await Promise.resolve().then(() => require("./live-designer-ZFVVYPVH.cjs"));
|
|
8
|
-
vitePlugin = liveDesigner({ ...(moduleOptions == null ? void 0 : moduleOptions.liveDesigner) || {}
|
|
10
|
+
vitePlugin = liveDesigner({ ...(moduleOptions == null ? void 0 : moduleOptions.liveDesigner) || {} });
|
|
9
11
|
} catch (err) {
|
|
10
12
|
console.log(err);
|
|
11
13
|
console.log("Pinegrow: @pinegrow/astro-module was unable to load @pinegrow/vite-plugin live-designer!");
|
|
12
14
|
}
|
|
13
|
-
|
|
15
|
+
let config = {
|
|
14
16
|
plugins: vitePlugin ? [vitePlugin] : []
|
|
15
17
|
};
|
|
18
|
+
(_a = config.plugins) == null ? void 0 : _a.push(_vite4.default.call(void 0, { ...(moduleOptions == null ? void 0 : moduleOptions.autoImportComponents) || {} }));
|
|
16
19
|
const ignoreList = [
|
|
17
|
-
.../* @__PURE__ */ new Set([...((
|
|
20
|
+
.../* @__PURE__ */ new Set([...((_c = (_b = config == null ? void 0 : config.server) == null ? void 0 : _b.watch) == null ? void 0 : _c.ignored) || [], "**/_pgbackup/**", "**/_pginfo/**", "**/pinegrow.json"])
|
|
18
21
|
];
|
|
19
|
-
|
|
22
|
+
config = _vite.mergeConfig.call(void 0, config, {
|
|
20
23
|
server: {
|
|
21
24
|
watch: {
|
|
22
25
|
ignored: ignoreList
|
|
23
26
|
}
|
|
24
27
|
}
|
|
25
28
|
});
|
|
29
|
+
const alias = (_d = config == null ? void 0 : config.resolve) == null ? void 0 : _d.alias;
|
|
30
|
+
if (!alias) {
|
|
31
|
+
config = _vite.mergeConfig.call(void 0, config, {
|
|
32
|
+
resolve: {
|
|
33
|
+
alias: {
|
|
34
|
+
"@": _path2.default.resolve(config.root || process.cwd(), "./src")
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
return config;
|
|
26
40
|
}
|
|
27
41
|
function createIntegration(moduleOptions) {
|
|
28
42
|
return {
|
|
@@ -41,6 +55,12 @@ function createIntegration(moduleOptions) {
|
|
|
41
55
|
server.config.plugins.splice(liveDesignerPluginIndex, 1);
|
|
42
56
|
const astroBuildIndex = server.config.plugins.findIndex((plugin) => plugin.name === "astro:build");
|
|
43
57
|
server.config.plugins.splice(astroBuildIndex, 0, liveDesignerPlugin);
|
|
58
|
+
const alias = server.config.resolve.alias.find((alias2) => alias2.find === "@");
|
|
59
|
+
const aliases = server.config.resolve.alias.filter((alias2) => alias2.find !== "@");
|
|
60
|
+
server.config.resolve.alias = [...aliases];
|
|
61
|
+
if (alias) {
|
|
62
|
+
server.config.resolve.alias.push(alias);
|
|
63
|
+
}
|
|
44
64
|
},
|
|
45
65
|
"astro:build:setup": ({ vite, pages, target }) => {
|
|
46
66
|
},
|
package/dist/index.js
CHANGED
|
@@ -1,28 +1,42 @@
|
|
|
1
1
|
// src/index.ts
|
|
2
2
|
import { mergeConfig } from "vite";
|
|
3
|
+
import Components from "unplugin-vue-components/vite";
|
|
4
|
+
import path from "path";
|
|
3
5
|
async function getViteConfiguration(moduleOptions) {
|
|
4
|
-
var _a, _b;
|
|
6
|
+
var _a, _b, _c, _d;
|
|
5
7
|
let vitePlugin;
|
|
6
8
|
try {
|
|
7
9
|
const { liveDesigner } = await import("./live-designer-LATOGT4K.js");
|
|
8
|
-
vitePlugin = liveDesigner({ ...(moduleOptions == null ? void 0 : moduleOptions.liveDesigner) || {}
|
|
10
|
+
vitePlugin = liveDesigner({ ...(moduleOptions == null ? void 0 : moduleOptions.liveDesigner) || {} });
|
|
9
11
|
} catch (err) {
|
|
10
12
|
console.log(err);
|
|
11
13
|
console.log("Pinegrow: @pinegrow/astro-module was unable to load @pinegrow/vite-plugin live-designer!");
|
|
12
14
|
}
|
|
13
|
-
|
|
15
|
+
let config = {
|
|
14
16
|
plugins: vitePlugin ? [vitePlugin] : []
|
|
15
17
|
};
|
|
18
|
+
(_a = config.plugins) == null ? void 0 : _a.push(Components({ ...(moduleOptions == null ? void 0 : moduleOptions.autoImportComponents) || {} }));
|
|
16
19
|
const ignoreList = [
|
|
17
|
-
.../* @__PURE__ */ new Set([...((
|
|
20
|
+
.../* @__PURE__ */ new Set([...((_c = (_b = config == null ? void 0 : config.server) == null ? void 0 : _b.watch) == null ? void 0 : _c.ignored) || [], "**/_pgbackup/**", "**/_pginfo/**", "**/pinegrow.json"])
|
|
18
21
|
];
|
|
19
|
-
|
|
22
|
+
config = mergeConfig(config, {
|
|
20
23
|
server: {
|
|
21
24
|
watch: {
|
|
22
25
|
ignored: ignoreList
|
|
23
26
|
}
|
|
24
27
|
}
|
|
25
28
|
});
|
|
29
|
+
const alias = (_d = config == null ? void 0 : config.resolve) == null ? void 0 : _d.alias;
|
|
30
|
+
if (!alias) {
|
|
31
|
+
config = mergeConfig(config, {
|
|
32
|
+
resolve: {
|
|
33
|
+
alias: {
|
|
34
|
+
"@": path.resolve(config.root || process.cwd(), "./src")
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
return config;
|
|
26
40
|
}
|
|
27
41
|
function createIntegration(moduleOptions) {
|
|
28
42
|
return {
|
|
@@ -41,6 +55,12 @@ function createIntegration(moduleOptions) {
|
|
|
41
55
|
server.config.plugins.splice(liveDesignerPluginIndex, 1);
|
|
42
56
|
const astroBuildIndex = server.config.plugins.findIndex((plugin) => plugin.name === "astro:build");
|
|
43
57
|
server.config.plugins.splice(astroBuildIndex, 0, liveDesignerPlugin);
|
|
58
|
+
const alias = server.config.resolve.alias.find((alias2) => alias2.find === "@");
|
|
59
|
+
const aliases = server.config.resolve.alias.filter((alias2) => alias2.find !== "@");
|
|
60
|
+
server.config.resolve.alias = [...aliases];
|
|
61
|
+
if (alias) {
|
|
62
|
+
server.config.resolve.alias.push(alias);
|
|
63
|
+
}
|
|
44
64
|
},
|
|
45
65
|
"astro:build:setup": ({ vite, pages, target }) => {
|
|
46
66
|
},
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }require('./chunk-4NKIVEY7.cjs');
|
|
2
|
+
|
|
3
|
+
// src/live-designer.mjs
|
|
4
|
+
var _viteplugin = require('@pinegrow/vite-plugin'); var _viteplugin2 = _interopRequireDefault(_viteplugin);
|
|
5
|
+
var liveDesigner = _viteplugin2.default.liveDesigner;
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
exports.liveDesigner = liveDesigner;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pinegrow/astro-module",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.87",
|
|
4
4
|
"description": "Pinegrow Astro Module",
|
|
5
5
|
"author": "Pinegrow (http://pinegrow.com/)",
|
|
6
6
|
"license": "MIT",
|
|
@@ -28,7 +28,8 @@
|
|
|
28
28
|
"increment-beta-version": "npm version prerelease --preid=beta"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@pinegrow/vite-plugin": "3.0.0-beta.
|
|
31
|
+
"@pinegrow/vite-plugin": "3.0.0-beta.87",
|
|
32
|
+
"unplugin-vue-components": "^0.24.1"
|
|
32
33
|
},
|
|
33
34
|
"devDependencies": {
|
|
34
35
|
"astro": "^2.1.5",
|
|
@@ -36,7 +37,7 @@
|
|
|
36
37
|
"typescript": "^4.4.4"
|
|
37
38
|
},
|
|
38
39
|
"peerDependencies": {
|
|
39
|
-
"
|
|
40
|
-
"
|
|
40
|
+
"@astrojs/vue": "^2.1.0",
|
|
41
|
+
"astro": "^2.1.5"
|
|
41
42
|
}
|
|
42
43
|
}
|