@versori/run 0.2.11 → 0.2.13

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.
@@ -12,6 +12,7 @@ export declare class CronAPIClient implements CronProvider {
12
12
  constructor(baseUrl: string, envId: string, integrationUrl: string);
13
13
  static fromEnv(): CronAPIClient;
14
14
  static addDefaultCronPort(url: string): string;
15
+ makeCronPath(name: string): string;
15
16
  updateCrons(crons: Map<string, string>): Promise<void>;
16
17
  runLocalFn(crons: Cron[]): void;
17
18
  }
@@ -1 +1 @@
1
- {"version":3,"file":"cronapi.d.ts","sourceRoot":"","sources":["../../../../../src/src/dsl/http/versori/cronapi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAY3C,KAAK,IAAI,GAAG;IACR,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,qBAAa,aAAc,YAAW,YAAY;IAC9C,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,KAAK,CAAS;IACtB,OAAO,CAAC,cAAc,CAAS;IAC/B,OAAO,CAAC,QAAQ,CAAU;gBAEd,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM;IAOlE,MAAM,CAAC,OAAO,IAAI,aAAa;IAoB/B,MAAM,CAAC,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;IAUxC,WAAW,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAyB5D,UAAU,CAAC,KAAK,EAAE,IAAI,EAAE;CAoB3B"}
1
+ {"version":3,"file":"cronapi.d.ts","sourceRoot":"","sources":["../../../../../src/src/dsl/http/versori/cronapi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAY3C,KAAK,IAAI,GAAG;IACR,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,qBAAa,aAAc,YAAW,YAAY;IAC9C,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,KAAK,CAAS;IACtB,OAAO,CAAC,cAAc,CAAS;IAC/B,OAAO,CAAC,QAAQ,CAAU;gBAEd,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM;IAOlE,MAAM,CAAC,OAAO,IAAI,aAAa;IAoB/B,MAAM,CAAC,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;IAU9C,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAM5B,WAAW,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAyB5D,UAAU,CAAC,KAAK,EAAE,IAAI,EAAE;CAoB3B"}
@@ -51,11 +51,16 @@ export class CronAPIClient {
51
51
  }
52
52
  return parsedUrl.toString();
53
53
  }
54
+ makeCronPath(name) {
55
+ const url = new URL(this.integrationUrl);
56
+ url.pathname = `/cron/${name}`;
57
+ return url.toString();
58
+ }
54
59
  async updateCrons(crons) {
55
60
  const cronsArray = Array.from(crons.entries()).map(([name, schedule]) => ({
56
61
  name,
57
62
  schedule,
58
- url: `${this.integrationUrl}/cron/${name}`,
63
+ url: this.makeCronPath(name),
59
64
  }));
60
65
  if (this.runLocal) {
61
66
  this.runLocalFn(cronsArray);
@@ -181,8 +181,8 @@ function extractDigest(asc, req) {
181
181
  }
182
182
  break;
183
183
  case 'header':
184
- if (req.headers[asc.name]) {
185
- return req.headers[asc.name];
184
+ if (req.headers[asc.name.toLowerCase()]) {
185
+ return req.headers[asc.name.toLowerCase()];
186
186
  }
187
187
  break;
188
188
  case 'cookie':
@@ -1 +1 @@
1
- {"version":3,"file":"schedule.d.ts","sourceRoot":"","sources":["../../../../../src/src/interpreter/memory/compilers/schedule.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAEzF,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AA4H7C,eAAO,MAAM,gBAAgB,EAAE,eAAe,CAAC,YAAY,EAAE,eAAe,CAG3E,CAAC"}
1
+ {"version":3,"file":"schedule.d.ts","sourceRoot":"","sources":["../../../../../src/src/interpreter/memory/compilers/schedule.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAEzF,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AA0H7C,eAAO,MAAM,gBAAgB,EAAE,eAAe,CAAC,YAAY,EAAE,eAAe,CAG3E,CAAC"}
@@ -50,7 +50,6 @@ function compileSchedule(ctx, trigger, signal) {
50
50
  }
51
51
  activations.forEach((activation) => {
52
52
  const executionCtx = ctx.contextProvider.create({}, { activation });
53
- executionCtx.log.info('no activations found, continuing');
54
53
  try {
55
54
  subscriber.next(executionCtx);
56
55
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@versori/run",
3
- "version": "v0.2.11",
3
+ "version": "v0.2.13",
4
4
  "description": "Versori Run",
5
5
  "homepage": "https://github.com/versori/versori-run#readme",
6
6
  "repository": {
@@ -12,6 +12,7 @@ export declare class CronAPIClient implements CronProvider {
12
12
  constructor(baseUrl: string, envId: string, integrationUrl: string);
13
13
  static fromEnv(): CronAPIClient;
14
14
  static addDefaultCronPort(url: string): string;
15
+ makeCronPath(name: string): string;
15
16
  updateCrons(crons: Map<string, string>): Promise<void>;
16
17
  runLocalFn(crons: Cron[]): void;
17
18
  }
@@ -1 +1 @@
1
- {"version":3,"file":"cronapi.d.ts","sourceRoot":"","sources":["../../../../../src/src/dsl/http/versori/cronapi.ts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AAC,GAAG,EAAE,MAAM,GAAG,MAAM;IAU9C,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAM5B,WAAW,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAyB5D,UAAU,CAAC,KAAK,EAAE,IAAI,EAAE;CAoB3B"}
@@ -54,11 +54,16 @@ class CronAPIClient {
54
54
  }
55
55
  return parsedUrl.toString();
56
56
  }
57
+ makeCronPath(name) {
58
+ const url = new URL(this.integrationUrl);
59
+ url.pathname = `/cron/${name}`;
60
+ return url.toString();
61
+ }
57
62
  async updateCrons(crons) {
58
63
  const cronsArray = Array.from(crons.entries()).map(([name, schedule]) => ({
59
64
  name,
60
65
  schedule,
61
- url: `${this.integrationUrl}/cron/${name}`,
66
+ url: this.makeCronPath(name),
62
67
  }));
63
68
  if (this.runLocal) {
64
69
  this.runLocalFn(cronsArray);
@@ -186,8 +186,8 @@ function extractDigest(asc, req) {
186
186
  }
187
187
  break;
188
188
  case 'header':
189
- if (req.headers[asc.name]) {
190
- return req.headers[asc.name];
189
+ if (req.headers[asc.name.toLowerCase()]) {
190
+ return req.headers[asc.name.toLowerCase()];
191
191
  }
192
192
  break;
193
193
  case 'cookie':
@@ -1 +1 @@
1
- {"version":3,"file":"schedule.d.ts","sourceRoot":"","sources":["../../../../../src/src/interpreter/memory/compilers/schedule.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAEzF,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AA4H7C,eAAO,MAAM,gBAAgB,EAAE,eAAe,CAAC,YAAY,EAAE,eAAe,CAG3E,CAAC"}
1
+ {"version":3,"file":"schedule.d.ts","sourceRoot":"","sources":["../../../../../src/src/interpreter/memory/compilers/schedule.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAEzF,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AA0H7C,eAAO,MAAM,gBAAgB,EAAE,eAAe,CAAC,YAAY,EAAE,eAAe,CAG3E,CAAC"}
@@ -53,7 +53,6 @@ function compileSchedule(ctx, trigger, signal) {
53
53
  }
54
54
  activations.forEach((activation) => {
55
55
  const executionCtx = ctx.contextProvider.create({}, { activation });
56
- executionCtx.log.info('no activations found, continuing');
57
56
  try {
58
57
  subscriber.next(executionCtx);
59
58
  }