nuxt-processor 0.0.8 → 0.0.10
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 +1 -1
- package/dist/cli.cjs +1 -1
- package/dist/cli.mjs +1 -1
- package/dist/module.cjs +5 -3
- package/dist/module.json +1 -1
- package/dist/module.mjs +5 -3
- package/dist/shared/{nuxt-processor.CSspK4r-.cjs → nuxt-processor.CIZw0pFs.cjs} +1 -1
- package/dist/shared/{nuxt-processor.Blgdjku5.mjs → nuxt-processor.IJ4IK9ZI.mjs} +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/cli.cjs
CHANGED
|
@@ -8,7 +8,7 @@ const pathe = require('pathe');
|
|
|
8
8
|
const consola = require('consola');
|
|
9
9
|
const citty = require('citty');
|
|
10
10
|
const kit = require('@nuxt/kit');
|
|
11
|
-
const _package = require('./shared/nuxt-processor.
|
|
11
|
+
const _package = require('./shared/nuxt-processor.CIZw0pFs.cjs');
|
|
12
12
|
|
|
13
13
|
const ensureNuxtProject = async (args) => {
|
|
14
14
|
const dir = pathe.resolve(args.dir);
|
package/dist/cli.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import { resolve } from 'pathe';
|
|
|
6
6
|
import { consola } from 'consola';
|
|
7
7
|
import { createMain, defineCommand } from 'citty';
|
|
8
8
|
import { loadNuxtConfig } from '@nuxt/kit';
|
|
9
|
-
import { v as version, d as description, n as name } from './shared/nuxt-processor.
|
|
9
|
+
import { v as version, d as description, n as name } from './shared/nuxt-processor.IJ4IK9ZI.mjs';
|
|
10
10
|
|
|
11
11
|
const ensureNuxtProject = async (args) => {
|
|
12
12
|
const dir = resolve(args.dir);
|
package/dist/module.cjs
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const kit = require('@nuxt/kit');
|
|
4
|
-
const _package = require('./shared/nuxt-processor.
|
|
4
|
+
const _package = require('./shared/nuxt-processor.CIZw0pFs.cjs');
|
|
5
5
|
const node_path = require('node:path');
|
|
6
6
|
const fg = require('fast-glob');
|
|
7
|
+
const workers_js = require('../dist/runtime/server/utils/workers.js');
|
|
7
8
|
|
|
8
9
|
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
|
|
9
10
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; }
|
|
@@ -47,8 +48,9 @@ const module$1 = kit.defineNuxtModule({
|
|
|
47
48
|
},
|
|
48
49
|
async setup(_options, nuxt) {
|
|
49
50
|
const { resolve } = kit.createResolver((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('module.cjs', document.baseURI).href)));
|
|
51
|
+
const { setConnection } = workers_js.$workers();
|
|
52
|
+
setConnection(_options.redis);
|
|
50
53
|
function generateWorkersEntryContent(workerFiles) {
|
|
51
|
-
const redisInline = JSON.stringify(_options.redis ?? {});
|
|
52
54
|
const toImportArray = workerFiles.map((id) => `() => import(${JSON.stringify(id)})`).join(",\n ");
|
|
53
55
|
return `
|
|
54
56
|
import { fileURLToPath } from 'node:url'
|
|
@@ -59,7 +61,7 @@ import { $workers } from '#processor-utils'
|
|
|
59
61
|
// Initialize connection as early as possible so any imports that register
|
|
60
62
|
// workers/queues have a valid connection available.
|
|
61
63
|
const api = $workers()
|
|
62
|
-
api.setConnection(${
|
|
64
|
+
api.setConnection(${JSON.stringify(_options.redis ?? {})})
|
|
63
65
|
|
|
64
66
|
export async function createWorkersApp() {
|
|
65
67
|
// Avoid EPIPE when stdout/stderr are closed by terminal (e.g., Ctrl+C piping)
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { useNuxt, createResolver, defineNuxtModule, addTypeTemplate } from '@nuxt/kit';
|
|
2
|
-
import { c as configKey, a as compatibility, v as version, n as name } from './shared/nuxt-processor.
|
|
2
|
+
import { c as configKey, a as compatibility, v as version, n as name } from './shared/nuxt-processor.IJ4IK9ZI.mjs';
|
|
3
3
|
import { relative } from 'node:path';
|
|
4
4
|
import fg from 'fast-glob';
|
|
5
|
+
import { $workers } from '../dist/runtime/server/utils/workers.js';
|
|
5
6
|
|
|
6
7
|
const scanFolder = async (path) => {
|
|
7
8
|
const nuxt = useNuxt();
|
|
@@ -40,8 +41,9 @@ const module = defineNuxtModule({
|
|
|
40
41
|
},
|
|
41
42
|
async setup(_options, nuxt) {
|
|
42
43
|
const { resolve } = createResolver(import.meta.url);
|
|
44
|
+
const { setConnection } = $workers();
|
|
45
|
+
setConnection(_options.redis);
|
|
43
46
|
function generateWorkersEntryContent(workerFiles) {
|
|
44
|
-
const redisInline = JSON.stringify(_options.redis ?? {});
|
|
45
47
|
const toImportArray = workerFiles.map((id) => `() => import(${JSON.stringify(id)})`).join(",\n ");
|
|
46
48
|
return `
|
|
47
49
|
import { fileURLToPath } from 'node:url'
|
|
@@ -52,7 +54,7 @@ import { $workers } from '#processor-utils'
|
|
|
52
54
|
// Initialize connection as early as possible so any imports that register
|
|
53
55
|
// workers/queues have a valid connection available.
|
|
54
56
|
const api = $workers()
|
|
55
|
-
api.setConnection(${
|
|
57
|
+
api.setConnection(${JSON.stringify(_options.redis ?? {})})
|
|
56
58
|
|
|
57
59
|
export async function createWorkersApp() {
|
|
58
60
|
// Avoid EPIPE when stdout/stderr are closed by terminal (e.g., Ctrl+C piping)
|