nuxt-processor 0.0.9 → 0.0.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/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.gTQ3Cgq_.cjs');
11
+ const _package = require('./shared/nuxt-processor.5DlcaEgd.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.DyQoQGHF.mjs';
9
+ import { v as version, d as description, n as name } from './shared/nuxt-processor.dUSuauLs.mjs';
10
10
 
11
11
  const ensureNuxtProject = async (args) => {
12
12
  const dir = resolve(args.dir);
package/dist/module.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const kit = require('@nuxt/kit');
4
- const _package = require('./shared/nuxt-processor.gTQ3Cgq_.cjs');
4
+ const _package = require('./shared/nuxt-processor.5DlcaEgd.cjs');
5
5
  const node_path = require('node:path');
6
6
  const fg = require('fast-glob');
7
7
 
@@ -47,11 +47,13 @@ const module$1 = kit.defineNuxtModule({
47
47
  },
48
48
  async setup(_options, nuxt) {
49
49
  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)));
50
+ const redisInline = JSON.stringify(_options.redis ?? {});
50
51
  const nitroPlugin = `
52
+ import { defineNitroPlugin } from '#imports'
51
53
  import { $workers } from '#processor-utils'
52
54
 
53
55
  export default defineNitroPlugin(() => {
54
- $workers().setConnection(${JSON.stringify(_options.redis)})
56
+ $workers().setConnection(${redisInline})
55
57
  })
56
58
  `;
57
59
  const tpl = kit.addTemplate({
@@ -61,7 +63,6 @@ const module$1 = kit.defineNuxtModule({
61
63
  });
62
64
  kit.addServerPlugin(tpl.dst);
63
65
  function generateWorkersEntryContent(workerFiles) {
64
- const redisInline = JSON.stringify(_options.redis ?? {});
65
66
  const toImportArray = workerFiles.map((id) => `() => import(${JSON.stringify(id)})`).join(",\n ");
66
67
  return `
67
68
  import { fileURLToPath } from 'node:url'
package/dist/module.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nuxt-processor",
3
- "version": "0.0.9",
3
+ "version": "0.0.11",
4
4
  "compatibility": {
5
5
  "nuxt": "^4.0.0 || ^3.0.0"
6
6
  },
package/dist/module.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { useNuxt, createResolver, defineNuxtModule, addTemplate, addServerPlugin, addTypeTemplate } from '@nuxt/kit';
2
- import { c as configKey, a as compatibility, v as version, n as name } from './shared/nuxt-processor.DyQoQGHF.mjs';
2
+ import { c as configKey, a as compatibility, v as version, n as name } from './shared/nuxt-processor.dUSuauLs.mjs';
3
3
  import { relative } from 'node:path';
4
4
  import fg from 'fast-glob';
5
5
 
@@ -40,11 +40,13 @@ const module = defineNuxtModule({
40
40
  },
41
41
  async setup(_options, nuxt) {
42
42
  const { resolve } = createResolver(import.meta.url);
43
+ const redisInline = JSON.stringify(_options.redis ?? {});
43
44
  const nitroPlugin = `
45
+ import { defineNitroPlugin } from '#imports'
44
46
  import { $workers } from '#processor-utils'
45
47
 
46
48
  export default defineNitroPlugin(() => {
47
- $workers().setConnection(${JSON.stringify(_options.redis)})
49
+ $workers().setConnection(${redisInline})
48
50
  })
49
51
  `;
50
52
  const tpl = addTemplate({
@@ -54,7 +56,6 @@ const module = defineNuxtModule({
54
56
  });
55
57
  addServerPlugin(tpl.dst);
56
58
  function generateWorkersEntryContent(workerFiles) {
57
- const redisInline = JSON.stringify(_options.redis ?? {});
58
59
  const toImportArray = workerFiles.map((id) => `() => import(${JSON.stringify(id)})`).join(",\n ");
59
60
  return `
60
61
  import { fileURLToPath } from 'node:url'
@@ -20,5 +20,6 @@ export declare function $workers(): {
20
20
  stopAll: () => Promise<void>;
21
21
  readonly queues: Queue<any, any, any, any, any, any>[];
22
22
  readonly workers: Worker<any, any, any>[];
23
+ readonly connection: import("bullmq").ConnectionOptions | undefined;
23
24
  };
24
25
  export type { Queue, Worker, Processor, QueueOptions, WorkerOptions, JobsOptions, Job };
@@ -49,6 +49,9 @@ export function $workers() {
49
49
  },
50
50
  get workers() {
51
51
  return registry.workers;
52
+ },
53
+ get connection() {
54
+ return registry.connection;
52
55
  }
53
56
  };
54
57
  }
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const name = "nuxt-processor";
4
- const version = "0.0.9";
4
+ const version = "0.0.11";
5
5
  const description = "Nuxt Processor";
6
6
  const configKey = "processor";
7
7
  const compatibility = {
@@ -1,5 +1,5 @@
1
1
  const name = "nuxt-processor";
2
- const version = "0.0.9";
2
+ const version = "0.0.11";
3
3
  const description = "Nuxt Processor";
4
4
  const configKey = "processor";
5
5
  const compatibility = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nuxt-processor",
3
- "version": "0.0.9",
3
+ "version": "0.0.11",
4
4
  "description": "Nuxt Processor",
5
5
  "repository": "https://github.com/aidanhibbard/nuxt-processor",
6
6
  "license": "MIT",
@@ -35,6 +35,7 @@
35
35
  "dev": "npm run dev:prepare && nuxi dev playground",
36
36
  "dev:build": "nuxi build playground",
37
37
  "dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground",
38
+ "ci:dev:build": "npm run dev:prepare && cd playground && npm i && cd ../ && npm run dev:build",
38
39
  "release": "npm run lint && npm run prepack && changelogen --release && npm publish && git push --follow-tags",
39
40
  "lint": "eslint .",
40
41
  "test": "vitest run",