ngx-pendo 1.14.2 → 1.14.3

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.
@@ -31,10 +31,10 @@ export class NgxPendoIdDirective {
31
31
  // eslint-disable-next-line @angular-eslint/no-input-rename
32
32
  this.inherit = true;
33
33
  }
34
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: NgxPendoIdDirective, deps: [{ token: i1.NgxPendoService }], target: i0.ɵɵFactoryTarget.Directive }); }
35
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.1.1", type: NgxPendoIdDirective, isStandalone: true, selector: "[ngx-pendo-id]", inputs: { pendoId: ["ngx-pendo-id", "pendoId"], inherit: ["ngx-pendo-inherit", "inherit"] }, host: { properties: { "attr.data-pendo-id": "this.pendoId", "attr.ngx-pendo-disable-inherit": "this.disableInherit" } }, ngImport: i0 }); }
34
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: NgxPendoIdDirective, deps: [{ token: i1.NgxPendoService }], target: i0.ɵɵFactoryTarget.Directive }); }
35
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.2", type: NgxPendoIdDirective, isStandalone: true, selector: "[ngx-pendo-id]", inputs: { pendoId: ["ngx-pendo-id", "pendoId"], inherit: ["ngx-pendo-inherit", "inherit"] }, host: { properties: { "attr.data-pendo-id": "this.pendoId", "attr.ngx-pendo-disable-inherit": "this.disableInherit" } }, ngImport: i0 }); }
36
36
  }
37
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: NgxPendoIdDirective, decorators: [{
37
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: NgxPendoIdDirective, decorators: [{
38
38
  type: Directive,
39
39
  args: [{
40
40
  selector: '[ngx-pendo-id]',
@@ -29,10 +29,10 @@ export class NgxPendoSectionDirective {
29
29
  this.subscriptions.forEach(s => s.unsubscribe());
30
30
  this.subscriptions = [];
31
31
  }
32
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: NgxPendoSectionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
33
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.1.1", type: NgxPendoSectionDirective, isStandalone: true, selector: "[ngx-pendo-section]", inputs: { pendoSection: ["ngx-pendo-section", "pendoSection"], inherit: ["ngx-pendo-inherit", "inherit"] }, host: { properties: { "attr.ngx-pendo-section": "this.pendoSection", "attr.ngx-pendo-disable-inherit": "this.disableInherit" } }, queries: [{ propertyName: "idDirectives", predicate: NgxPendoIdDirective }, { propertyName: "sectionDirectives", predicate: NgxPendoSectionDirective }, { propertyName: "allIdDirectives", predicate: NgxPendoIdDirective, descendants: true }], usesOnChanges: true, ngImport: i0 }); }
32
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: NgxPendoSectionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
33
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.2", type: NgxPendoSectionDirective, isStandalone: true, selector: "[ngx-pendo-section]", inputs: { pendoSection: ["ngx-pendo-section", "pendoSection"], inherit: ["ngx-pendo-inherit", "inherit"] }, host: { properties: { "attr.ngx-pendo-section": "this.pendoSection", "attr.ngx-pendo-disable-inherit": "this.disableInherit" } }, queries: [{ propertyName: "idDirectives", predicate: NgxPendoIdDirective }, { propertyName: "sectionDirectives", predicate: NgxPendoSectionDirective }, { propertyName: "allIdDirectives", predicate: NgxPendoIdDirective, descendants: true }], usesOnChanges: true, ngImport: i0 }); }
34
34
  }
35
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: NgxPendoSectionDirective, decorators: [{
35
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: NgxPendoSectionDirective, decorators: [{
36
36
  type: Directive,
37
37
  args: [{
38
38
  selector: '[ngx-pendo-section]',
@@ -22,11 +22,11 @@ export class NgxPendoModule {
22
22
  ngModule: NgxPendoModule
23
23
  };
24
24
  }
25
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: NgxPendoModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
26
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.1.1", ngImport: i0, type: NgxPendoModule, imports: [NgxPendoIdDirective, NgxPendoSectionDirective], exports: [NgxPendoIdDirective, NgxPendoSectionDirective] }); }
27
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: NgxPendoModule }); }
25
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: NgxPendoModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
26
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.2.2", ngImport: i0, type: NgxPendoModule, imports: [NgxPendoIdDirective, NgxPendoSectionDirective], exports: [NgxPendoIdDirective, NgxPendoSectionDirective] }); }
27
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: NgxPendoModule }); }
28
28
  }
29
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: NgxPendoModule, decorators: [{
29
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: NgxPendoModule, decorators: [{
30
30
  type: NgModule,
31
31
  args: [{
32
32
  imports: [NgxPendoIdDirective, NgxPendoSectionDirective],
@@ -61,10 +61,10 @@ export class NgxPendoService {
61
61
  disableDebugging() {
62
62
  this.pendo.disableDebugging();
63
63
  }
64
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: NgxPendoService, deps: [{ token: NGX_PENDO_SETTINGS_TOKEN }, { token: NGX_PENDO_CONTEXT }], target: i0.ɵɵFactoryTarget.Injectable }); }
65
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: NgxPendoService, providedIn: 'root' }); }
64
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: NgxPendoService, deps: [{ token: NGX_PENDO_SETTINGS_TOKEN }, { token: NGX_PENDO_CONTEXT }], target: i0.ɵɵFactoryTarget.Injectable }); }
65
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: NgxPendoService, providedIn: 'root' }); }
66
66
  }
67
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: NgxPendoService, decorators: [{
67
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: NgxPendoService, decorators: [{
68
68
  type: Injectable,
69
69
  args: [{
70
70
  providedIn: 'root'
@@ -83,10 +83,10 @@ class NgxPendoService {
83
83
  disableDebugging() {
84
84
  this.pendo.disableDebugging();
85
85
  }
86
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: NgxPendoService, deps: [{ token: NGX_PENDO_SETTINGS_TOKEN }, { token: NGX_PENDO_CONTEXT }], target: i0.ɵɵFactoryTarget.Injectable }); }
87
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: NgxPendoService, providedIn: 'root' }); }
86
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: NgxPendoService, deps: [{ token: NGX_PENDO_SETTINGS_TOKEN }, { token: NGX_PENDO_CONTEXT }], target: i0.ɵɵFactoryTarget.Injectable }); }
87
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: NgxPendoService, providedIn: 'root' }); }
88
88
  }
89
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: NgxPendoService, decorators: [{
89
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: NgxPendoService, decorators: [{
90
90
  type: Injectable,
91
91
  args: [{
92
92
  providedIn: 'root'
@@ -129,10 +129,10 @@ class NgxPendoIdDirective {
129
129
  // eslint-disable-next-line @angular-eslint/no-input-rename
130
130
  this.inherit = true;
131
131
  }
132
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: NgxPendoIdDirective, deps: [{ token: NgxPendoService }], target: i0.ɵɵFactoryTarget.Directive }); }
133
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.1.1", type: NgxPendoIdDirective, isStandalone: true, selector: "[ngx-pendo-id]", inputs: { pendoId: ["ngx-pendo-id", "pendoId"], inherit: ["ngx-pendo-inherit", "inherit"] }, host: { properties: { "attr.data-pendo-id": "this.pendoId", "attr.ngx-pendo-disable-inherit": "this.disableInherit" } }, ngImport: i0 }); }
132
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: NgxPendoIdDirective, deps: [{ token: NgxPendoService }], target: i0.ɵɵFactoryTarget.Directive }); }
133
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.2", type: NgxPendoIdDirective, isStandalone: true, selector: "[ngx-pendo-id]", inputs: { pendoId: ["ngx-pendo-id", "pendoId"], inherit: ["ngx-pendo-inherit", "inherit"] }, host: { properties: { "attr.data-pendo-id": "this.pendoId", "attr.ngx-pendo-disable-inherit": "this.disableInherit" } }, ngImport: i0 }); }
134
134
  }
135
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: NgxPendoIdDirective, decorators: [{
135
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: NgxPendoIdDirective, decorators: [{
136
136
  type: Directive,
137
137
  args: [{
138
138
  selector: '[ngx-pendo-id]',
@@ -178,10 +178,10 @@ class NgxPendoSectionDirective {
178
178
  this.subscriptions.forEach(s => s.unsubscribe());
179
179
  this.subscriptions = [];
180
180
  }
181
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: NgxPendoSectionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
182
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.1.1", type: NgxPendoSectionDirective, isStandalone: true, selector: "[ngx-pendo-section]", inputs: { pendoSection: ["ngx-pendo-section", "pendoSection"], inherit: ["ngx-pendo-inherit", "inherit"] }, host: { properties: { "attr.ngx-pendo-section": "this.pendoSection", "attr.ngx-pendo-disable-inherit": "this.disableInherit" } }, queries: [{ propertyName: "idDirectives", predicate: NgxPendoIdDirective }, { propertyName: "sectionDirectives", predicate: NgxPendoSectionDirective }, { propertyName: "allIdDirectives", predicate: NgxPendoIdDirective, descendants: true }], usesOnChanges: true, ngImport: i0 }); }
181
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: NgxPendoSectionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
182
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.2", type: NgxPendoSectionDirective, isStandalone: true, selector: "[ngx-pendo-section]", inputs: { pendoSection: ["ngx-pendo-section", "pendoSection"], inherit: ["ngx-pendo-inherit", "inherit"] }, host: { properties: { "attr.ngx-pendo-section": "this.pendoSection", "attr.ngx-pendo-disable-inherit": "this.disableInherit" } }, queries: [{ propertyName: "idDirectives", predicate: NgxPendoIdDirective }, { propertyName: "sectionDirectives", predicate: NgxPendoSectionDirective }, { propertyName: "allIdDirectives", predicate: NgxPendoIdDirective, descendants: true }], usesOnChanges: true, ngImport: i0 }); }
183
183
  }
184
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: NgxPendoSectionDirective, decorators: [{
184
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: NgxPendoSectionDirective, decorators: [{
185
185
  type: Directive,
186
186
  args: [{
187
187
  selector: '[ngx-pendo-section]',
@@ -267,11 +267,11 @@ class NgxPendoModule {
267
267
  ngModule: NgxPendoModule
268
268
  };
269
269
  }
270
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: NgxPendoModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
271
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.1.1", ngImport: i0, type: NgxPendoModule, imports: [NgxPendoIdDirective, NgxPendoSectionDirective], exports: [NgxPendoIdDirective, NgxPendoSectionDirective] }); }
272
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: NgxPendoModule }); }
270
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: NgxPendoModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
271
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.2.2", ngImport: i0, type: NgxPendoModule, imports: [NgxPendoIdDirective, NgxPendoSectionDirective], exports: [NgxPendoIdDirective, NgxPendoSectionDirective] }); }
272
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: NgxPendoModule }); }
273
273
  }
274
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: NgxPendoModule, decorators: [{
274
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: NgxPendoModule, decorators: [{
275
275
  type: NgModule,
276
276
  args: [{
277
277
  imports: [NgxPendoIdDirective, NgxPendoSectionDirective],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ngx-pendo",
3
- "version": "1.14.2",
3
+ "version": "1.14.3",
4
4
  "description": "A simple wrapper to load Pendo by angular way",
5
5
  "contributors": [
6
6
  {
@@ -10,7 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  const schematics_1 = require("@angular-devkit/schematics");
13
- const components_1 = require("@schematics/angular/private/components");
13
+ const standalone_1 = require("@schematics/angular/private/standalone");
14
14
  const utility_1 = require("@schematics/angular/utility");
15
15
  const ast_utils_1 = require("@schematics/angular/utility/ast-utils");
16
16
  const ng_ast_utils_1 = require("@schematics/angular/utility/ng-ast-utils");
@@ -38,8 +38,8 @@ function addImportToNgModule(mainFile, options) {
38
38
  function addStandaloneConfig(mainFile, options) {
39
39
  return (host) => {
40
40
  const providerFn = 'provideNgxPendo';
41
- if ((0, components_1.callsProvidersFunction)(host, mainFile, providerFn)) {
42
- // exit because the store config is already provided
41
+ if ((0, standalone_1.callsProvidersFunction)(host, mainFile, providerFn)) {
42
+ // exit because the ngx-pendo config is already provided
43
43
  return host;
44
44
  }
45
45
  return (0, utility_1.addRootProvider)(options.project, ({ code, external }) => {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../projects/ngx-pendo/schematics/ng-add/index.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,2DAAiF;AACjF,uEAAgF;AAChF,yDAA8D;AAC9D,qEAAkG;AAClG,2EAA6F;AAC7F,qEAAqE;AACrE,mFAA2E;AAC3E,qDAA2D;AAE3D,sCAA+C;AAC/C,4CAAqD;AACrD,8CAA+E;AAE/E,MAAM,WAAW,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;AAElD,SAAS,mBAAmB,CAAC,QAAgB,EAAE,OAAe;IAC5D,OAAO,CAAC,IAAU,EAAE,EAAE;QACpB,MAAM,aAAa,GAAG,IAAA,+BAAgB,EAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;QACvD,MAAM,YAAY,GAAG,IAAA,qBAAe,EAAC,IAAI,EAAE,aAAa,CAAC,CAAC;QAC1D,MAAM,YAAY,GAAG;kBACP,OAAO,CAAC,WAAW;;GAElC,CAAC;QAEA,IAAA,2BAAkB,EAAC,IAAI,EAAE,aAAa,EAAE;YACtC,IAAA,wBAAY,EAAC,YAAY,EAAE,aAAa,EAAE,gBAAgB,EAAE,WAAW,CAAC;YACxE,GAAG,IAAA,uCAA2B,EAAC,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,YAAY,EAAE,IAAI,CAAC;SAC3F,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC;AAED,SAAS,mBAAmB,CAAC,QAAgB,EAAE,OAAe;IAC5D,OAAO,CAAC,IAAU,EAAE,EAAE;QACpB,MAAM,UAAU,GAAG,iBAAiB,CAAC;QAErC,IAAI,IAAA,mCAAsB,EAAC,IAAI,EAAE,QAAQ,EAAE,UAAU,CAAC,EAAE,CAAC;YACvD,oDAAoD;YACpD,OAAO,IAAI,CAAC;QACd,CAAC;QAED,OAAO,IAAA,yBAAe,EAAC,OAAO,CAAC,OAAO,EAAE,CAAC,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-48,18 +48,32 @@ describe('ng add ngx pendo', () => {
48
48
  }));
49
49
  it('should update app module', () => __awaiter(void 0, void 0, void 0, function* () {
50
50
  const options = Object.assign({}, defaultOptions);
51
- const tree = yield schematicRunner.runSchematic('ng-add', options, appTree);
52
- const content = tree.readContent('/projects/bar/src/app/app.module.ts');
53
- expect(content).toMatch(/NgxPendoModule.forRoot\({\n\W{2,}pendoApiKey: 'pendo-api-key',\n\W{2,}pendoIdFormatter: \(pendoId: string\) => pendoId.toLowerCase\(\)\n\W{2,}\}\)/);
54
- expect(content).toMatch(/import { NgxPendoModule } from 'ngx-pendo';/);
51
+ const importRegex = /import { NgxPendoModule } from 'ngx-pendo';/gm;
52
+ const providerRegex = /NgxPendoModule.forRoot\({\n\W{2,}pendoApiKey: 'pendo-api-key',\n\W{2,}pendoIdFormatter: \(pendoId: string\) => pendoId.toLowerCase\(\)\n\W{2,}\}\)/gm;
53
+ for (let i = 0; i < 2; i++) {
54
+ const tree = yield schematicRunner.runSchematic('ng-add', options, appTree);
55
+ const content = tree.readContent('/projects/bar/src/app/app.module.ts');
56
+ const importMatches = content.match(importRegex);
57
+ const providerMatches = content.match(providerRegex);
58
+ // check config import and not duplicated
59
+ expect(importMatches === null || importMatches === void 0 ? void 0 : importMatches.length).toBe(1);
60
+ expect(providerMatches === null || providerMatches === void 0 ? void 0 : providerMatches.length).toBe(1);
61
+ }
55
62
  }));
56
63
  it('should update app config for standalone', () => __awaiter(void 0, void 0, void 0, function* () {
57
64
  const options = Object.assign(Object.assign({}, defaultOptions), { project: 'bar-standalone' });
58
65
  const projectPath = '/projects/bar-standalone';
59
- const tree = yield schematicRunner.runSchematic('ng-add', options, appTree);
60
- const content = tree.readContent(`${projectPath}/src/app/app.config.ts`);
61
- expect(content).toMatch(/provideNgxPendo\(\{ pendoApiKey: 'pendo-api-key', pendoIdFormatter: \(pendoId: string\) => pendoId.toLowerCase\(\) \}\)/);
62
- expect(content).toMatch(/import { provideNgxPendo } from 'ngx-pendo';/);
66
+ const importRegex = /import { provideNgxPendo } from 'ngx-pendo';/gm;
67
+ const providerRegex = /provideNgxPendo\(\{ pendoApiKey: 'pendo-api-key', pendoIdFormatter: \(pendoId: string\) => pendoId.toLowerCase\(\) \}\)/gm;
68
+ for (let i = 0; i < 2; i++) {
69
+ const tree = yield schematicRunner.runSchematic('ng-add', options, appTree);
70
+ const content = tree.readContent(`${projectPath}/src/app/app.config.ts`);
71
+ const importMatches = content.match(importRegex);
72
+ const providerMatches = content.match(providerRegex);
73
+ // check config import and not duplicated
74
+ expect(importMatches === null || importMatches === void 0 ? void 0 : importMatches.length).toBe(1);
75
+ expect(providerMatches === null || providerMatches === void 0 ? void 0 : providerMatches.length).toBe(1);
76
+ }
63
77
  }));
64
78
  });
65
79
  //# sourceMappingURL=index.spec.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.spec.js","sourceRoot":"","sources":["../../../../projects/ngx-pendo/schematics/ng-add/index.spec.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,gEAAuF;AACvF,6BAA6B;AAC7B,mEAA6F;AAI7F,QAAQ,CAAC,kBAAkB,EAAE,GAAG,EAAE;IAChC,MAAM,eAAe,GAAG,IAAI,6BAAmB,CAAC,WAAW,EAAE,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,oBAAoB,CAAC,CAAC,CAAC;IACzG,MAAM,cAAc,GAAoB;QACtC,OAAO,EAAE,KAAK;QACd,WAAW,EAAE,eAAe;KAC7B,CAAC;IAEF,MAAM,gBAAgB,GAAqB;QACzC,IAAI,EAAE,WAAW;QACjB,cAAc,EAAE,UAAU;QAC1B,OAAO,EAAE,OAAO;KACjB,CAAC;IACF,MAAM,UAAU,GAAuB;QACrC,IAAI,EAAE,KAAK;QACX,WAAW,EAAE,KAAK;QAClB,cAAc,EAAE,KAAK;QACrB,OAAO,EAAE,KAAK;QACd,KAAK,EAAE,cAAK,CAAC,IAAI;QACjB,SAAS,EAAE,KAAK;QAChB,eAAe,EAAE,KAAK;QACtB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