partner-center-broker 1.0.1 → 1.1.0
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 +12 -12
- package/.eslintignore +4 -3
- package/.eslintrc.json +54 -54
- package/.github/workflows/main.yml +30 -0
- package/.github/workflows/npm-publish.yml +58 -44
- package/.prettierignore +4 -3
- package/LICENSE +675 -674
- package/README.md +252 -135
- package/{dist → lib}/converters.d.ts +21 -17
- package/{dist → lib}/converters.js +62 -48
- package/lib/helpers.d.ts +5 -0
- package/lib/helpers.js +149 -0
- package/{dist → lib}/index.d.ts +18 -17
- package/{dist → lib}/index.js +361 -290
- package/{dist → lib}/interfaces.d.ts +221 -172
- package/{dist → lib}/interfaces.js +2 -2
- package/package.json +63 -57
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,30 @@
|
|
|
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: '14'
|
|
20
|
+
registry-url: https://registry.npmjs.org/
|
|
21
|
+
- run: |
|
|
22
|
+
npm ci
|
|
23
|
+
npm install
|
|
24
|
+
npm run rebuild
|
|
25
|
+
npm run test
|
|
26
|
+
env:
|
|
27
|
+
PARTNER_CENTER_TENANT_ID: ${{ secrets.TENANT_ID }}
|
|
28
|
+
PARTNER_CENTER_CLIENT_ID: ${{ secrets.CLIENT_ID }}
|
|
29
|
+
PARTNER_CENTER_CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
|
|
30
|
+
PARTNER_CENTER_APP_ID: ${{ secrets.DVLUP_PWA_APP_ID }}
|
|
@@ -1,44 +1,58 @@
|
|
|
1
|
-
name: Package And Distribute
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
1
|
+
name: Package And Distribute
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- 'releases/*'
|
|
7
|
+
paths-ignore:
|
|
8
|
+
- '**/*.md'
|
|
9
|
+
- '**/*.gitignore'
|
|
10
|
+
- '**/*.gitattributes'
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
# Verify everything builds and tests pass before we run any publishing steps
|
|
14
|
+
build-and-test:
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v2
|
|
18
|
+
- uses: actions/setup-node@v2
|
|
19
|
+
with:
|
|
20
|
+
node-version: '14'
|
|
21
|
+
- run: |
|
|
22
|
+
npm ci
|
|
23
|
+
npm run prep
|
|
24
|
+
npm run test
|
|
25
|
+
|
|
26
|
+
publish-npm:
|
|
27
|
+
needs: build-and-test
|
|
28
|
+
runs-on: ubuntu-latest
|
|
29
|
+
steps:
|
|
30
|
+
- uses: actions/checkout@v2
|
|
31
|
+
- uses: actions/setup-node@v2
|
|
32
|
+
with:
|
|
33
|
+
node-version: '14'
|
|
34
|
+
registry-url: https://registry.npmjs.org/
|
|
35
|
+
- run: |
|
|
36
|
+
npm ci
|
|
37
|
+
npm run rebuild
|
|
38
|
+
npm pack
|
|
39
|
+
npm publish
|
|
40
|
+
env:
|
|
41
|
+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
|
|
42
|
+
|
|
43
|
+
publish-gpr:
|
|
44
|
+
needs: build-and-test
|
|
45
|
+
runs-on: ubuntu-latest
|
|
46
|
+
steps:
|
|
47
|
+
- uses: actions/checkout@v2
|
|
48
|
+
- uses: actions/setup-node@v2
|
|
49
|
+
with:
|
|
50
|
+
node-version: '14'
|
|
51
|
+
registry-url: https://npm.pkg.github.com/
|
|
52
|
+
- run: |
|
|
53
|
+
npm ci
|
|
54
|
+
npm run rebuild
|
|
55
|
+
npm pack
|
|
56
|
+
npm publish
|
|
57
|
+
env:
|
|
58
|
+
NODE_AUTH_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__
|