@peers-app/peers-sdk 0.19.12 → 0.19.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.
|
@@ -141,6 +141,7 @@ async function createPackage(dataContext, deps, opts) {
|
|
|
141
141
|
defaultValue: deps.packagesRootDir,
|
|
142
142
|
dataContext,
|
|
143
143
|
});
|
|
144
|
+
await pvar.loadingPromise;
|
|
144
145
|
pvar(location);
|
|
145
146
|
// Install the dev bundle
|
|
146
147
|
const result = await (0, package_installer_1.installPackageFromBundles)(dataContext, deps, packageId, {
|
|
@@ -108,13 +108,21 @@ async function installPackageFromBundles(dataContext, deps, packageId, opts) {
|
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
|
-
// 10. Update package
|
|
111
|
+
// 10. Update package record if needed (description, first-install activation)
|
|
112
112
|
const pkg = await (0, packages_1.Packages)(dataContext).get(packageId);
|
|
113
|
-
if (pkg
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
description
|
|
117
|
-
|
|
113
|
+
if (pkg) {
|
|
114
|
+
let needsSave = false;
|
|
115
|
+
if (info.description && info.description !== pkg.description) {
|
|
116
|
+
pkg.description = info.description;
|
|
117
|
+
needsSave = true;
|
|
118
|
+
}
|
|
119
|
+
if (!pkg.activePackageVersionId) {
|
|
120
|
+
pkg.activePackageVersionId = savedPv.packageVersionId;
|
|
121
|
+
needsSave = true;
|
|
122
|
+
}
|
|
123
|
+
if (needsSave) {
|
|
124
|
+
await (0, packages_1.Packages)(dataContext).signAndSave(pkg);
|
|
125
|
+
}
|
|
118
126
|
}
|
|
119
127
|
// 11. Activate on device (unless skipResolve)
|
|
120
128
|
if (!opts?.skipResolve && pkg) {
|