partner-center-broker 1.0.1 → 1.2.1

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/.editorconfig CHANGED
@@ -1,12 +1,12 @@
1
- root = true
2
-
3
- [*]
4
- indent_style = space
5
- indent_size = 2
6
- end_of_line = lf
7
- charset = utf-8
8
- trim_trailing_whitespace = true
9
- insert_final_newline = true
10
-
11
- [*.md]
12
- trim_trailing_whitespace = false
1
+ root = true
2
+
3
+ [*]
4
+ indent_style = space
5
+ indent_size = 2
6
+ end_of_line = lf
7
+ charset = utf-8
8
+ trim_trailing_whitespace = true
9
+ insert_final_newline = true
10
+
11
+ [*.md]
12
+ trim_trailing_whitespace = false
package/.eslintignore CHANGED
@@ -1,3 +1,4 @@
1
- dist/
2
- lib/
3
- node_modules/
1
+ dist/
2
+ lib/
3
+ node_modules/
4
+ __tests__
package/.eslintrc.json CHANGED
@@ -1,54 +1,54 @@
1
- {
2
- "plugins": ["jest", "@typescript-eslint"],
3
- "extends": ["plugin:github/recommended"],
4
- "parser": "@typescript-eslint/parser",
5
- "parserOptions": {
6
- "ecmaVersion": 9,
7
- "sourceType": "module",
8
- "project": "./tsconfig.json"
9
- },
10
- "rules": {
11
- "eslint-comments/no-use": "off",
12
- "import/no-namespace": "off",
13
- "no-unused-vars": "off",
14
- "@typescript-eslint/no-unused-vars": "error",
15
- "@typescript-eslint/explicit-member-accessibility": ["error", {"accessibility": "no-public"}],
16
- "@typescript-eslint/no-require-imports": "error",
17
- "@typescript-eslint/array-type": "error",
18
- "@typescript-eslint/await-thenable": "error",
19
- "@typescript-eslint/ban-ts-comment": "error",
20
- "camelcase": "off",
21
- "@typescript-eslint/consistent-type-assertions": "error",
22
- "@typescript-eslint/explicit-function-return-type": ["error", {"allowExpressions": true}],
23
- "@typescript-eslint/func-call-spacing": ["error", "never"],
24
- "@typescript-eslint/no-array-constructor": "error",
25
- "@typescript-eslint/no-empty-interface": "error",
26
- "@typescript-eslint/no-explicit-any": "error",
27
- "@typescript-eslint/no-extraneous-class": "error",
28
- "@typescript-eslint/no-for-in-array": "error",
29
- "@typescript-eslint/no-inferrable-types": "error",
30
- "@typescript-eslint/no-misused-new": "error",
31
- "@typescript-eslint/no-namespace": "error",
32
- "@typescript-eslint/no-non-null-assertion": "warn",
33
- "@typescript-eslint/no-unnecessary-qualifier": "error",
34
- "@typescript-eslint/no-unnecessary-type-assertion": "error",
35
- "@typescript-eslint/no-useless-constructor": "error",
36
- "@typescript-eslint/no-var-requires": "error",
37
- "@typescript-eslint/prefer-for-of": "warn",
38
- "@typescript-eslint/prefer-function-type": "warn",
39
- "@typescript-eslint/prefer-includes": "error",
40
- "@typescript-eslint/prefer-string-starts-ends-with": "error",
41
- "@typescript-eslint/promise-function-async": "error",
42
- "@typescript-eslint/require-array-sort-compare": "error",
43
- "@typescript-eslint/restrict-plus-operands": "error",
44
- "semi": "off",
45
- "@typescript-eslint/semi": ["error", "never"],
46
- "@typescript-eslint/type-annotation-spacing": "error",
47
- "@typescript-eslint/unbound-method": "error"
48
- },
49
- "env": {
50
- "node": true,
51
- "es6": true,
52
- "jest/globals": true
53
- }
54
- }
1
+ {
2
+ "plugins": ["jest", "@typescript-eslint"],
3
+ "extends": ["plugin:github/recommended"],
4
+ "parser": "@typescript-eslint/parser",
5
+ "parserOptions": {
6
+ "ecmaVersion": 9,
7
+ "sourceType": "module",
8
+ "project": "./tsconfig.json"
9
+ },
10
+ "rules": {
11
+ "eslint-comments/no-use": "off",
12
+ "import/no-namespace": "off",
13
+ "no-unused-vars": "off",
14
+ "@typescript-eslint/no-unused-vars": "error",
15
+ "@typescript-eslint/explicit-member-accessibility": ["error", {"accessibility": "no-public"}],
16
+ "@typescript-eslint/no-require-imports": "error",
17
+ "@typescript-eslint/array-type": "error",
18
+ "@typescript-eslint/await-thenable": "error",
19
+ "@typescript-eslint/ban-ts-comment": "error",
20
+ "camelcase": "off",
21
+ "@typescript-eslint/consistent-type-assertions": "error",
22
+ "@typescript-eslint/explicit-function-return-type": ["error", {"allowExpressions": true}],
23
+ "@typescript-eslint/func-call-spacing": ["error", "never"],
24
+ "@typescript-eslint/no-array-constructor": "error",
25
+ "@typescript-eslint/no-empty-interface": "error",
26
+ "@typescript-eslint/no-explicit-any": "error",
27
+ "@typescript-eslint/no-extraneous-class": "error",
28
+ "@typescript-eslint/no-for-in-array": "error",
29
+ "@typescript-eslint/no-inferrable-types": "error",
30
+ "@typescript-eslint/no-misused-new": "error",
31
+ "@typescript-eslint/no-namespace": "error",
32
+ "@typescript-eslint/no-non-null-assertion": "warn",
33
+ "@typescript-eslint/no-unnecessary-qualifier": "error",
34
+ "@typescript-eslint/no-unnecessary-type-assertion": "error",
35
+ "@typescript-eslint/no-useless-constructor": "error",
36
+ "@typescript-eslint/no-var-requires": "error",
37
+ "@typescript-eslint/prefer-for-of": "warn",
38
+ "@typescript-eslint/prefer-function-type": "warn",
39
+ "@typescript-eslint/prefer-includes": "error",
40
+ "@typescript-eslint/prefer-string-starts-ends-with": "error",
41
+ "@typescript-eslint/promise-function-async": "error",
42
+ "@typescript-eslint/require-array-sort-compare": "error",
43
+ "@typescript-eslint/restrict-plus-operands": "error",
44
+ "semi": "off",
45
+ "@typescript-eslint/semi": ["error", "never"],
46
+ "@typescript-eslint/type-annotation-spacing": "error",
47
+ "@typescript-eslint/unbound-method": "error"
48
+ },
49
+ "env": {
50
+ "node": true,
51
+ "es6": true,
52
+ "jest/globals": true
53
+ }
54
+ }
@@ -0,0 +1,29 @@
1
+ name: 'Main'
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ paths-ignore:
8
+ - '**/*.md'
9
+ - '**/*.gitignore'
10
+ - '**/*.gitattributes'
11
+
12
+ jobs:
13
+ build-and-test:
14
+ runs-on: windows-latest
15
+ steps:
16
+ - uses: actions/checkout@v2
17
+ - uses: actions/setup-node@v2
18
+ with:
19
+ node-version: '24'
20
+ registry-url: https://registry.npmjs.org/
21
+ - run: |
22
+ npm ci
23
+ npm install
24
+ npm run prep
25
+ env:
26
+ PARTNER_CENTER_TENANT_ID: ${{secrets.TENANT_ID}}
27
+ PARTNER_CENTER_CLIENT_ID: ${{secrets.CLIENT_ID}}
28
+ PARTNER_CENTER_CLIENT_SECRET: ${{secrets.CLIENT_SECRET}}
29
+ PARTNER_CENTER_APP_ID: ${{secrets.DVLUP_PWA_APP_ID}}
@@ -1,44 +1,78 @@
1
- name: Package And Distribute
2
-
3
- on:
4
- release:
5
- types: [created]
6
-
7
- jobs:
8
- build:
9
- runs-on: ubuntu-latest
10
- steps:
11
- - uses: actions/checkout@v2
12
- - uses: actions/setup-node@v1
13
- with:
14
- node-version: 12
15
- - run: npm ci
16
- - run: npm test
17
-
18
- publish-npm:
19
- needs: build
20
- runs-on: ubuntu-latest
21
- steps:
22
- - uses: actions/checkout@v2
23
- - uses: actions/setup-node@v1
24
- with:
25
- node-version: 12
26
- registry-url: https://registry.npmjs.org/
27
- - run: npm ci
28
- - run: npm publish
29
- env:
30
- NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
31
-
32
- publish-gpr:
33
- needs: build
34
- runs-on: ubuntu-latest
35
- steps:
36
- - uses: actions/checkout@v2
37
- - uses: actions/setup-node@v1
38
- with:
39
- node-version: 12
40
- registry-url: https://npm.pkg.github.com/
41
- - run: npm ci
42
- - run: npm publish
43
- env:
44
- NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
1
+ name: Publish Packages
2
+
3
+ on:
4
+ workflow_dispatch:
5
+
6
+ permissions:
7
+ id-token: write # for npm OIDC
8
+ contents: write # for github releases
9
+
10
+ jobs:
11
+ test:
12
+ name: Build and Test
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - uses: actions/checkout@v2
16
+ - uses: actions/setup-node@v2
17
+ with:
18
+ node-version: '24'
19
+ - name: Run tests
20
+ run: |
21
+ npm ci
22
+ npm install
23
+ npm run prep
24
+
25
+
26
+ publish-npm:
27
+ name: Publish to npmjs.org
28
+ needs: [test]
29
+ runs-on: ubuntu-latest
30
+ steps:
31
+ - uses: actions/checkout@v2
32
+ - uses: actions/setup-node@v2
33
+ with:
34
+ node-version: '24'
35
+ registry-url: https://registry.npmjs.org/
36
+
37
+ - name: Delete existing version if present
38
+ continue-on-error: true
39
+ run: |
40
+ VERSION=$(node -p "require('./package.json').version")
41
+ npm unpublish partner-center-broker@$VERSION --registry=https://registry.npmjs.org/ || true
42
+
43
+ - name: Publish
44
+ run: |
45
+ npm ci
46
+ npm run package
47
+ npm publish --registry=https://registry.npmjs.org/
48
+ npm run publish-docs
49
+
50
+ - name: Get package version number
51
+ id: package-version
52
+ run: echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
53
+
54
+ - uses: actions/upload-artifact@v4
55
+ with:
56
+ name: partner-center-broker-v${{steps.package-version.outputs.version}}
57
+ path: partner-center-broker-${{steps.package-version.outputs.version}}.tgz
58
+
59
+ - name: Create GitHub release
60
+ id: create-release
61
+ uses: actions/create-release@v1
62
+ with:
63
+ tag_name: v${{steps.package-version.outputs.version}}
64
+ release_name: v${{steps.package-version.outputs.version}}
65
+ draft: false
66
+ prerelease: false
67
+ env:
68
+ GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
69
+
70
+ - name: Upload package to release
71
+ uses: actions/upload-release-asset@v1
72
+ with:
73
+ upload_url: ${{steps.create-release.outputs.upload_url}}
74
+ asset_path: partner-center-broker-${{steps.package-version.outputs.version}}.tgz
75
+ asset_name: partner-center-broker-${{steps.package-version.outputs.version}}.tgz
76
+ asset_content_type: application/gzip
77
+ env:
78
+ GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
package/.prettierignore CHANGED
@@ -1,3 +1,4 @@
1
- dist/
2
- lib/
3
- node_modules/
1
+ dist/
2
+ lib/
3
+ node_modules/
4
+ __tests__