@nordicsemiconductor/pc-nrfconnect-shared 197.0.0 → 199.0.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/Changelog.md +26 -0
- package/ipc/MetaFiles.ts +1 -0
- package/package.json +4 -1
- package/scripts/create-source.ts +78 -0
- package/scripts/nordic-publish.js +17 -18
- package/scripts/nordic-publish.ts +267 -159
- package/scripts/prepare-shared-release.ts +2 -2
- package/src/About/DeviceCard.tsx +4 -8
- package/src/Device/deviceInfo/deviceInfo.ts +79 -60
- package/src/utils/systemReport.ts +2 -5
- package/typings/generated/ipc/MetaFiles.d.ts +3 -0
- package/typings/generated/ipc/MetaFiles.d.ts.map +1 -1
- package/typings/generated/ipc/schema/packageJson.d.ts +6 -6
- package/typings/generated/scripts/create-source.d.ts +3 -0
- package/typings/generated/scripts/create-source.d.ts.map +1 -0
- package/typings/generated/src/About/DeviceCard.d.ts.map +1 -1
- package/typings/generated/src/Device/deviceInfo/deviceInfo.d.ts +2 -4
- package/typings/generated/src/Device/deviceInfo/deviceInfo.d.ts.map +1 -1
- package/typings/generated/src/utils/packageJson.d.ts +2 -2
- package/typings/generated/src/utils/systemReport.d.ts.map +1 -1
package/Changelog.md
CHANGED
|
@@ -7,6 +7,32 @@ This project does _not_ adhere to
|
|
|
7
7
|
[Semantic Versioning](https://semver.org/spec/v2.0.0.html) but contrary to it
|
|
8
8
|
every new version is a new major version.
|
|
9
9
|
|
|
10
|
+
## 199.0.0 - 2025-02-20
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- `nordic-publish.ts` deleted the description of a source.
|
|
15
|
+
|
|
16
|
+
## 198.0.0 - 2025-02-12
|
|
17
|
+
|
|
18
|
+
### Added
|
|
19
|
+
|
|
20
|
+
- Support for publishing apps to Artifactory.
|
|
21
|
+
|
|
22
|
+
### Fixed
|
|
23
|
+
|
|
24
|
+
- Product links for nRF54L15 DK, nRF54H20 DK, nRF9131 EK, nRF9151 DK, nRF9161
|
|
25
|
+
DK, and Nordic Thingy:91 X.
|
|
26
|
+
|
|
27
|
+
### Steps to upgrade when using this package
|
|
28
|
+
|
|
29
|
+
- When publishing the app via FTP (usually in the azure release pipeline), add
|
|
30
|
+
the parameter `--destination ftp` when calling the nordic-publish script.
|
|
31
|
+
- Copy the files `build.yml`, `release.yml`, and `release-latest.yml` from
|
|
32
|
+
https://github.com/NordicSemiconductor/pc-nrfconnect-boilerplate/tree/main/.github/workflows
|
|
33
|
+
to `.github/workflows`. If appropriate for an app, customise the list of
|
|
34
|
+
sources to deploy to in `release.yml`.
|
|
35
|
+
|
|
10
36
|
## 197.0.0 - 2025-02-05
|
|
11
37
|
|
|
12
38
|
### Added
|
package/ipc/MetaFiles.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nordicsemiconductor/pc-nrfconnect-shared",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "199.0.0",
|
|
4
4
|
"description": "Shared commodities for developing pc-nrfconnect-* packages",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -125,6 +125,9 @@
|
|
|
125
125
|
"zod": "^3.22.2",
|
|
126
126
|
"zod-validation-error": "^1.5.0"
|
|
127
127
|
},
|
|
128
|
+
"devDependencies": {
|
|
129
|
+
"@commander-js/extra-typings": "^10.0.3"
|
|
130
|
+
},
|
|
128
131
|
"typings": "./typings/generated/src/index.d.ts",
|
|
129
132
|
"eslintConfig": {
|
|
130
133
|
"extends": "./config/eslintrc"
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
#!/usr/bin/env ts-node
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* Copyright (c) 2025 Nordic Semiconductor ASA
|
|
5
|
+
*
|
|
6
|
+
* SPDX-License-Identifier: LicenseRef-Nordic-4-Clause
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { Command, Option } from '@commander-js/extra-typings';
|
|
10
|
+
|
|
11
|
+
import { SourceJson } from '../ipc/MetaFiles';
|
|
12
|
+
|
|
13
|
+
const fail = (message: string) => {
|
|
14
|
+
console.error(message);
|
|
15
|
+
process.exit(1);
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
if (process.env.ARTIFACTORY_TOKEN == null)
|
|
19
|
+
fail('The environment variable ARTIFACTORY_TOKEN must be set.');
|
|
20
|
+
const headers = { Authorization: `Bearer ${process.env.ARTIFACTORY_TOKEN}` };
|
|
21
|
+
|
|
22
|
+
const validAccessLevels = [
|
|
23
|
+
'external',
|
|
24
|
+
'external-confidential',
|
|
25
|
+
'internal',
|
|
26
|
+
'internal-confidential',
|
|
27
|
+
] as const;
|
|
28
|
+
|
|
29
|
+
const parseOptions = () =>
|
|
30
|
+
new Command()
|
|
31
|
+
.description('Create a new source in Artifactory')
|
|
32
|
+
.requiredOption('-i, --id <id>', 'Source id, e.g. release-test')
|
|
33
|
+
.addOption(
|
|
34
|
+
new Option('-a, --access-level <access level>', 'Access level')
|
|
35
|
+
.choices(validAccessLevels)
|
|
36
|
+
.makeOptionMandatory()
|
|
37
|
+
)
|
|
38
|
+
.requiredOption('-n, --name <name>', 'Name, e.g. "Release Test"')
|
|
39
|
+
.requiredOption(
|
|
40
|
+
'-d, --description <description>',
|
|
41
|
+
'Longer description, e.g. "Versions we intend to release next"'
|
|
42
|
+
)
|
|
43
|
+
.parse()
|
|
44
|
+
.opts();
|
|
45
|
+
|
|
46
|
+
type Options = ReturnType<typeof parseOptions>;
|
|
47
|
+
|
|
48
|
+
const url = (opts: Options) =>
|
|
49
|
+
`https://files.nordicsemi.com/artifactory/swtools/${opts.accessLevel}/ncd/apps/${opts.id}/source.json`;
|
|
50
|
+
|
|
51
|
+
const assertSourceDoesNotExist = async (opts: Options) => {
|
|
52
|
+
const get = await fetch(url(opts), { headers });
|
|
53
|
+
if (get.ok) fail(`Source ${url(opts)} already exists`);
|
|
54
|
+
|
|
55
|
+
// TODO: Check that no other source with the same name exists
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
const uploadSourceJson = async (opts: Options) => {
|
|
59
|
+
const source: SourceJson = {
|
|
60
|
+
name: opts.name,
|
|
61
|
+
description: opts.description,
|
|
62
|
+
apps: [],
|
|
63
|
+
};
|
|
64
|
+
const put = await fetch(url(opts), {
|
|
65
|
+
method: 'PUT',
|
|
66
|
+
body: JSON.stringify(source, null, 2),
|
|
67
|
+
headers,
|
|
68
|
+
});
|
|
69
|
+
if (!put.ok) fail(`Failed to upload ${url}: ${put.statusText}`);
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
const main = async () => {
|
|
73
|
+
const opts = parseOptions();
|
|
74
|
+
|
|
75
|
+
await assertSourceDoesNotExist(opts);
|
|
76
|
+
await uploadSourceJson(opts);
|
|
77
|
+
};
|
|
78
|
+
main();
|