trigger.dev 3.0.0-beta.25 → 3.0.0-beta.27

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 CHANGED
@@ -799,7 +799,7 @@ import invariant from "tiny-invariant";
799
799
  import { z as z4 } from "zod";
800
800
 
801
801
  // package.json
802
- var version = "3.0.0-beta.25";
802
+ var version = "3.0.0-beta.27";
803
803
  var dependencies = {
804
804
  "@anatine/esbuild-decorators": "^0.2.19",
805
805
  "@clack/prompts": "^0.7.0",
@@ -816,7 +816,7 @@ var dependencies = {
816
816
  "@opentelemetry/sdk-trace-base": "^1.22.0",
817
817
  "@opentelemetry/sdk-trace-node": "^1.22.0",
818
818
  "@opentelemetry/semantic-conventions": "^1.22.0",
819
- "@trigger.dev/core": "workspace:3.0.0-beta.25",
819
+ "@trigger.dev/core": "workspace:3.0.0-beta.27",
820
820
  "@types/degit": "^2.8.3",
821
821
  chalk: "^5.2.0",
822
822
  chokidar: "^3.5.3",
@@ -2864,6 +2864,32 @@ import { Glob } from "glob";
2864
2864
  import { readFileSync } from "node:fs";
2865
2865
  import { extname, isAbsolute } from "node:path";
2866
2866
  import tsConfigPaths from "tsconfig-paths";
2867
+ function mockServerOnlyPlugin() {
2868
+ return {
2869
+ name: "trigger-mock-server-only",
2870
+ setup(build3) {
2871
+ build3.onResolve({ filter: /server-only/ }, (args) => {
2872
+ if (args.path !== "server-only") {
2873
+ return void 0;
2874
+ }
2875
+ logger.debug(`[trigger-mock-server-only] Bundling ${args.path}`, {
2876
+ ...args
2877
+ });
2878
+ return {
2879
+ path: args.path,
2880
+ external: false,
2881
+ namespace: "server-only-mock"
2882
+ };
2883
+ });
2884
+ build3.onLoad({ filter: /server-only/, namespace: "server-only-mock" }, (args) => {
2885
+ return {
2886
+ contents: `export default true;`,
2887
+ loader: "js"
2888
+ };
2889
+ });
2890
+ }
2891
+ };
2892
+ }
2867
2893
  function bundleTriggerDevCore(buildIdentifier, tsconfigPath) {
2868
2894
  return {
2869
2895
  name: "trigger-bundle-core",
@@ -4517,6 +4543,7 @@ async function compileProject(config, options, configPath) {
4517
4543
  __PROJECT_CONFIG__: JSON.stringify(config)
4518
4544
  },
4519
4545
  plugins: [
4546
+ mockServerOnlyPlugin(),
4520
4547
  bundleDependenciesPlugin(
4521
4548
  "workerFacade",
4522
4549
  config.dependenciesToBundle,
@@ -5884,6 +5911,7 @@ function useDev({
5884
5911
  __PROJECT_CONFIG__: JSON.stringify(config)
5885
5912
  },
5886
5913
  plugins: [
5914
+ mockServerOnlyPlugin(),
5887
5915
  bundleTriggerDevCore("workerFacade", config.tsconfigPath),
5888
5916
  bundleDependenciesPlugin(
5889
5917
  "workerFacade",