chore: rename putil

This commit is contained in:
KernelDeimos 2024-08-29 17:13:19 -04:00 committed by Eric Dubé
parent 5f7d1f589a
commit 3361043b9d
76 changed files with 85 additions and 76 deletions

35
package-lock.json generated
View File

@ -43,7 +43,7 @@
"dependencies": { "dependencies": {
"@heyputer/kv.js": "^0.1.3", "@heyputer/kv.js": "^0.1.3",
"@heyputer/multest": "^0.0.2", "@heyputer/multest": "^0.0.2",
"@heyputer/puter-js-common": "^1.0.0", "@heyputer/putil": "^1.0.0",
"@opentelemetry/api": "^1.4.1", "@opentelemetry/api": "^1.4.1",
"@opentelemetry/auto-instrumentations-node": "^0.43.0", "@opentelemetry/auto-instrumentations-node": "^0.43.0",
"@opentelemetry/exporter-trace-otlp-grpc": "^0.40.0", "@opentelemetry/exporter-trace-otlp-grpc": "^0.40.0",
@ -195,7 +195,7 @@
"webpack-cli": "^5.1.4" "webpack-cli": "^5.1.4"
} }
}, },
"asdf/puter-js-common": { "asdf/putil": {
"version": "1.0.0", "version": "1.0.0",
"extraneous": true, "extraneous": true,
"license": "UNLICENSED" "license": "UNLICENSED"
@ -2597,14 +2597,18 @@
"resolved": "src/phoenix", "resolved": "src/phoenix",
"link": true "link": true
}, },
"node_modules/@heyputer/puter-js-common": { "node_modules/@heyputer/puter-wisp": {
"resolved": "src/puter-js-common", "resolved": "src/puter-wisp",
"link": true "link": true
}, },
"node_modules/@heyputer/puterjs": { "node_modules/@heyputer/puterjs": {
"resolved": "src/puter-js", "resolved": "src/puter-js",
"link": true "link": true
}, },
"node_modules/@heyputer/putil": {
"resolved": "src/putil",
"link": true
},
"node_modules/@heyputer/terminal": { "node_modules/@heyputer/terminal": {
"resolved": "src/terminal", "resolved": "src/terminal",
"link": true "link": true
@ -12515,9 +12519,9 @@
"license": "MIT" "license": "MIT"
}, },
"node_modules/mocha": { "node_modules/mocha": {
"version": "10.6.0", "version": "10.7.3",
"resolved": "https://registry.npmjs.org/mocha/-/mocha-10.6.0.tgz", "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.7.3.tgz",
"integrity": "sha512-hxjt4+EEB0SA0ZDygSS015t65lJw/I2yRCS3Ae+SJ5FrbzrXgfYwJr96f0OvIXdj7h4lv/vLCrH3rkiuizFSvw==", "integrity": "sha512-uQWxAu44wwiACGqjbPYmjo7Lg8sFrS3dQe7PP2FQI+woptP4vZXSMcfMyFL/e1yFEeEpV4RtyTpZROOKmxis+A==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
@ -16442,7 +16446,7 @@
"dependencies": { "dependencies": {
"@heyputer/kv.js": "^0.1.3", "@heyputer/kv.js": "^0.1.3",
"@heyputer/multest": "^0.0.2", "@heyputer/multest": "^0.0.2",
"@heyputer/puter-js-common": "^1.0.0", "@heyputer/putil": "^1.0.0",
"@opentelemetry/api": "^1.4.1", "@opentelemetry/api": "^1.4.1",
"@opentelemetry/auto-instrumentations-node": "^0.43.0", "@opentelemetry/auto-instrumentations-node": "^0.43.0",
"@opentelemetry/exporter-trace-otlp-grpc": "^0.40.0", "@opentelemetry/exporter-trace-otlp-grpc": "^0.40.0",
@ -16617,8 +16621,8 @@
"webpack-cli": "^5.1.4" "webpack-cli": "^5.1.4"
} }
}, },
"packages/puter-js-common": { "packages/putil": {
"name": "@heyputer/puter-js-common", "name": "@heyputer/putil",
"version": "1.0.0", "version": "1.0.0",
"extraneous": true, "extraneous": true,
"license": "UNLICENSED" "license": "UNLICENSED"
@ -16662,7 +16666,7 @@
"@aws-sdk/client-textract": "^3.621.0", "@aws-sdk/client-textract": "^3.621.0",
"@heyputer/kv.js": "^0.1.3", "@heyputer/kv.js": "^0.1.3",
"@heyputer/multest": "^0.0.2", "@heyputer/multest": "^0.0.2",
"@heyputer/puter-js-common": "^1.0.0", "@heyputer/putil": "^1.0.0",
"@mistralai/mistralai": "^1.0.3", "@mistralai/mistralai": "^1.0.3",
"@opentelemetry/api": "^1.4.1", "@opentelemetry/api": "^1.4.1",
"@opentelemetry/auto-instrumentations-node": "^0.43.0", "@opentelemetry/auto-instrumentations-node": "^0.43.0",
@ -16902,8 +16906,13 @@
"webpack-cli": "^5.1.4" "webpack-cli": "^5.1.4"
} }
}, },
"src/puter-js-common": { "src/puter-wisp": {
"name": "@heyputer/puter-js-common", "name": "@heyputer/puter-wisp",
"version": "1.0.0",
"license": "AGPL-3.0-only"
},
"src/putil": {
"name": "@heyputer/putil",
"version": "1.0.0", "version": "1.0.0",
"license": "UNLICENSED" "license": "UNLICENSED"
}, },

View File

@ -71,7 +71,7 @@ doing the useless work that reveals what the useful work is.
## Underlying Constructs ## Underlying Constructs
- [puter-js-common's README.md](../../packages/puter-js-common/README.md) - [putil's README.md](../../packages/putil/README.md)
- Whenever you see `AdvancedBase`, that's from here - Whenever you see `AdvancedBase`, that's from here
- Many things in backend extend this. Anything that doesn't only doesn't - Many things in backend extend this. Anything that doesn't only doesn't
because it was written before `AdvancedBase` existed. because it was written before `AdvancedBase` existed.

View File

@ -35,7 +35,7 @@ To function properly, Puter needs **CoreModule**, a database module,
and a storage module. and a storage module.
A module extends A module extends
[AdvancedBase](../../../puter-js-common/README.md) [AdvancedBase](../../../putil/README.md)
and implements and implements
an `install` method. The install method has one parameter, a an `install` method. The install method has one parameter, a
[Context](../../src/util/context.js) [Context](../../src/util/context.js)

View File

@ -12,7 +12,7 @@
"@aws-sdk/client-textract": "^3.621.0", "@aws-sdk/client-textract": "^3.621.0",
"@heyputer/kv.js": "^0.1.3", "@heyputer/kv.js": "^0.1.3",
"@heyputer/multest": "^0.0.2", "@heyputer/multest": "^0.0.2",
"@heyputer/puter-js-common": "^1.0.0", "@heyputer/putil": "^1.0.0",
"@mistralai/mistralai": "^1.0.3", "@mistralai/mistralai": "^1.0.3",
"@opentelemetry/api": "^1.4.1", "@opentelemetry/api": "^1.4.1",
"@opentelemetry/auto-instrumentations-node": "^0.43.0", "@opentelemetry/auto-instrumentations-node": "^0.43.0",

View File

@ -16,7 +16,7 @@
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
const { AdvancedBase } = require("@heyputer/puter-js-common"); const { AdvancedBase } = require("@heyputer/putil");
const Library = require("./definitions/Library"); const Library = require("./definitions/Library");
const { NotificationES } = require("./om/entitystorage/NotificationES"); const { NotificationES } = require("./om/entitystorage/NotificationES");
const { ProtectedAppES } = require("./om/entitystorage/ProtectedAppES"); const { ProtectedAppES } = require("./om/entitystorage/ProtectedAppES");

View File

@ -16,7 +16,7 @@
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
const { AdvancedBase } = require("@heyputer/puter-js-common"); const { AdvancedBase } = require("@heyputer/putil");
class DatabaseModule extends AdvancedBase { class DatabaseModule extends AdvancedBase {
async install (context) { async install (context) {

View File

@ -16,7 +16,7 @@
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
const { AdvancedBase } = require("@heyputer/puter-js-common"); const { AdvancedBase } = require("@heyputer/putil");
const { Context } = require('./util/context'); const { Context } = require('./util/context');
const BaseService = require("./services/BaseService"); const BaseService = require("./services/BaseService");
const useapi = require('useapi'); const useapi = require('useapi');

View File

@ -16,7 +16,7 @@
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
const { AdvancedBase } = require("@heyputer/puter-js-common"); const { AdvancedBase } = require("@heyputer/putil");
class LocalDiskStorageModule extends AdvancedBase { class LocalDiskStorageModule extends AdvancedBase {
async install (context) { async install (context) {

View File

@ -16,7 +16,7 @@
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
const { AdvancedBase } = require("@heyputer/puter-js-common"); const { AdvancedBase } = require("@heyputer/putil");
class PuterDriversModule extends AdvancedBase { class PuterDriversModule extends AdvancedBase {
async install () {} async install () {}

View File

@ -16,7 +16,7 @@
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
const { AdvancedBase } = require("@heyputer/puter-js-common"); const { AdvancedBase } = require("@heyputer/putil");
class ThirdPartyDriversModule extends AdvancedBase { class ThirdPartyDriversModule extends AdvancedBase {
// constructor () { // constructor () {

View File

@ -16,7 +16,7 @@
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
const { AdvancedBase } = require("@heyputer/puter-js-common"); const { AdvancedBase } = require("@heyputer/putil");
const { quot } = require("../util/strutil"); const { quot } = require("../util/strutil");
const { TechnicalError } = require("../errors/TechnicalError"); const { TechnicalError } = require("../errors/TechnicalError");
const { print_error_help } = require("../errors/error_help_details"); const { print_error_help } = require("../errors/error_help_details");

View File

@ -16,7 +16,7 @@
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
const { AdvancedBase } = require("@heyputer/puter-js-common"); const { AdvancedBase } = require("@heyputer/putil");
const { quot } = require("../util/strutil"); const { quot } = require("../util/strutil");
class ConfigLoader extends AdvancedBase { class ConfigLoader extends AdvancedBase {

View File

@ -16,7 +16,7 @@
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
const { AdvancedBase } = require("@heyputer/puter-js-common"); const { AdvancedBase } = require("@heyputer/putil");
const { Context } = require('../util/context') const { Context } = require('../util/context')
const APIError = require("../api/APIError"); const APIError = require("../api/APIError");
const { AppUnderUserActorType, UserActorType } = require("../services/auth/Actor"); const { AppUnderUserActorType, UserActorType } = require("../services/auth/Actor");

View File

@ -27,7 +27,7 @@ const SystemFSEntryService = require('./storage/SystemFSEntryService.js');
const PerformanceMonitor = require('../monitor/PerformanceMonitor.js'); const PerformanceMonitor = require('../monitor/PerformanceMonitor.js');
const { NodePathSelector, NodeUIDSelector, NodeInternalIDSelector } = require('./node/selectors.js'); const { NodePathSelector, NodeUIDSelector, NodeInternalIDSelector } = require('./node/selectors.js');
const FSNodeContext = require('./FSNodeContext.js'); const FSNodeContext = require('./FSNodeContext.js');
const { AdvancedBase } = require('@heyputer/puter-js-common'); const { AdvancedBase } = require('@heyputer/putil');
const { Context } = require('../util/context.js'); const { Context } = require('../util/context.js');
const { simple_retry } = require('../util/retryutil.js'); const { simple_retry } = require('../util/retryutil.js');
const APIError = require('../api/APIError.js'); const APIError = require('../api/APIError.js');

View File

@ -16,7 +16,7 @@
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
const { AdvancedBase } = require('@heyputer/puter-js-common'); const { AdvancedBase } = require('@heyputer/putil');
const PathResolver = require('../../routers/filesystem_api/batch/PathResolver'); const PathResolver = require('../../routers/filesystem_api/batch/PathResolver');
const commands = require('./commands').commands; const commands = require('./commands').commands;
const { WorkUnit } = require('../../services/runtime-analysis/ExpectationService'); const { WorkUnit } = require('../../services/runtime-analysis/ExpectationService');

View File

@ -16,7 +16,7 @@
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
const { AdvancedBase } = require("@heyputer/puter-js-common"); const { AdvancedBase } = require("@heyputer/putil");
const { AsyncProviderFeature } = require("../../traits/AsyncProviderFeature"); const { AsyncProviderFeature } = require("../../traits/AsyncProviderFeature");
const { HLMkdir, QuickMkdir } = require("../hl_operations/hl_mkdir"); const { HLMkdir, QuickMkdir } = require("../hl_operations/hl_mkdir");
const { Context } = require("../../util/context"); const { Context } = require("../../util/context");

View File

@ -16,7 +16,7 @@
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
const { AdvancedBase } = require("@heyputer/puter-js-common"); const { AdvancedBase } = require("@heyputer/putil");
const { id2path } = require("../../helpers"); const { id2path } = require("../../helpers");
const { PuterPath } = require("../lib/PuterPath"); const { PuterPath } = require("../lib/PuterPath");

View File

@ -1,4 +1,4 @@
const { AdvancedBase } = require("@heyputer/puter-js-common"); const { AdvancedBase } = require("@heyputer/putil");
class BroadcastModule extends AdvancedBase { class BroadcastModule extends AdvancedBase {
async install (context) { async install (context) {

View File

@ -16,7 +16,7 @@
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
const { AdvancedBase } = require("@heyputer/puter-js-common"); const { AdvancedBase } = require("@heyputer/putil");
const BaseService = require("../../services/BaseService"); const BaseService = require("../../services/BaseService");
const { CLink } = require("./connection/CLink"); const { CLink } = require("./connection/CLink");
const { SLink } = require("./connection/SLink"); const { SLink } = require("./connection/SLink");

View File

@ -1,4 +1,4 @@
const { AdvancedBase } = require("@heyputer/puter-js-common"); const { AdvancedBase } = require("@heyputer/putil");
const { ChannelFeature } = require("../../../traits/ChannelFeature"); const { ChannelFeature } = require("../../../traits/ChannelFeature");
class BaseLink extends AdvancedBase { class BaseLink extends AdvancedBase {

View File

@ -1,4 +1,4 @@
const { AdvancedBase } = require('@heyputer/puter-js-common'); const { AdvancedBase } = require('@heyputer/putil');
class KeyPairHelper extends AdvancedBase { class KeyPairHelper extends AdvancedBase {
static MODULES = { static MODULES = {

View File

@ -1,4 +1,4 @@
const { AdvancedBase } = require("@heyputer/puter-js-common"); const { AdvancedBase } = require("@heyputer/putil");
const config = require("../../config"); const config = require("../../config");
class PuterAIModule extends AdvancedBase { class PuterAIModule extends AdvancedBase {

View File

@ -16,7 +16,7 @@
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
const { AdvancedBase } = require("@heyputer/puter-js-common"); const { AdvancedBase } = require("@heyputer/putil");
const config = require("../../config"); const config = require("../../config");
class SelfHostedModule extends AdvancedBase { class SelfHostedModule extends AdvancedBase {

View File

@ -1,4 +1,4 @@
const { AdvancedBase } = require("@heyputer/puter-js-common"); const { AdvancedBase } = require("@heyputer/putil");
class TestDriversModule extends AdvancedBase { class TestDriversModule extends AdvancedBase {
async install (context) { async install (context) {

View File

@ -16,7 +16,7 @@
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
const { AdvancedBase } = require("@heyputer/puter-js-common"); const { AdvancedBase } = require("@heyputer/putil");
const { WeakConstructorFeature } = require("../traits/WeakConstructorFeature"); const { WeakConstructorFeature } = require("../traits/WeakConstructorFeature");
const { Eq, And } = require("./query/query"); const { Eq, And } = require("./query/query");
const { Entity } = require("./entitystorage/Entity"); const { Entity } = require("./entitystorage/Entity");

View File

@ -16,7 +16,7 @@
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
const { AdvancedBase } = require("@heyputer/puter-js-common"); const { AdvancedBase } = require("@heyputer/putil");
const { instance_ } = require("../../monitor/PerformanceMonitor"); const { instance_ } = require("../../monitor/PerformanceMonitor");
const { WeakConstructorFeature } = require("../../traits/WeakConstructorFeature"); const { WeakConstructorFeature } = require("../../traits/WeakConstructorFeature");
const { Property } = require("./Property"); const { Property } = require("./Property");

View File

@ -16,7 +16,7 @@
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
const { AdvancedBase } = require("@heyputer/puter-js-common"); const { AdvancedBase } = require("@heyputer/putil");
const { WeakConstructorFeature } = require("../../traits/WeakConstructorFeature"); const { WeakConstructorFeature } = require("../../traits/WeakConstructorFeature");
class PropType extends AdvancedBase { class PropType extends AdvancedBase {

View File

@ -16,7 +16,7 @@
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
const { AdvancedBase } = require("@heyputer/puter-js-common"); const { AdvancedBase } = require("@heyputer/putil");
const { WeakConstructorFeature } = require("../../traits/WeakConstructorFeature"); const { WeakConstructorFeature } = require("../../traits/WeakConstructorFeature");
class Property extends AdvancedBase { class Property extends AdvancedBase {

View File

@ -16,7 +16,7 @@
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
const { AdvancedBase } = require("@heyputer/puter-js-common"); const { AdvancedBase } = require("@heyputer/putil");
const { WeakConstructorFeature } = require("../../traits/WeakConstructorFeature"); const { WeakConstructorFeature } = require("../../traits/WeakConstructorFeature");
const { Context } = require("../../util/context"); const { Context } = require("../../util/context");

View File

@ -16,7 +16,7 @@
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
const { AdvancedBase } = require("@heyputer/puter-js-common"); const { AdvancedBase } = require("@heyputer/putil");
const { WeakConstructorFeature } = require("../../traits/WeakConstructorFeature"); const { WeakConstructorFeature } = require("../../traits/WeakConstructorFeature");
class Entity extends AdvancedBase { class Entity extends AdvancedBase {

View File

@ -16,7 +16,7 @@
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
const { AdvancedBase } = require("@heyputer/puter-js-common"); const { AdvancedBase } = require("@heyputer/putil");
const { BaseES } = require("./BaseES"); const { BaseES } = require("./BaseES");
const APIError = require("../../api/APIError"); const APIError = require("../../api/APIError");

View File

@ -16,7 +16,7 @@
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
const { AdvancedBase } = require("@heyputer/puter-js-common"); const { AdvancedBase } = require("@heyputer/putil");
const { BaseES } = require("./BaseES"); const { BaseES } = require("./BaseES");
const APIError = require("../../api/APIError"); const APIError = require("../../api/APIError");

View File

@ -16,7 +16,7 @@
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
const { AdvancedBase } = require("@heyputer/puter-js-common"); const { AdvancedBase } = require("@heyputer/putil");
const { WeakConstructorFeature } = require("../../traits/WeakConstructorFeature"); const { WeakConstructorFeature } = require("../../traits/WeakConstructorFeature");
class Predicate extends AdvancedBase { class Predicate extends AdvancedBase {

View File

@ -16,7 +16,7 @@
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
const { AdvancedBase } = require("@heyputer/puter-js-common"); const { AdvancedBase } = require("@heyputer/putil");
const api_error_handler = require("../../api/api_error_handler"); const api_error_handler = require("../../api/api_error_handler");
const config = require("../../config"); const config = require("../../config");
const { get_user, get_app, id2path } = require("../../helpers"); const { get_user, get_app, id2path } = require("../../helpers");

View File

@ -16,7 +16,7 @@
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
const { AdvancedBase } = require("@heyputer/puter-js-common"); const { AdvancedBase } = require("@heyputer/putil");
const NOOP = async () => {}; const NOOP = async () => {};

View File

@ -16,7 +16,7 @@
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
const { AdvancedBase } = require("@heyputer/puter-js-common"); const { AdvancedBase } = require("@heyputer/putil");
const config = require("../config"); const config = require("../config");
const { Context } = require("../util/context"); const { Context } = require("../util/context");
const { CompositeError } = require("../util/errorutil"); const { CompositeError } = require("../util/errorutil");

View File

@ -16,7 +16,7 @@
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
const { AdvancedBase } = require("@heyputer/puter-js-common"); const { AdvancedBase } = require("@heyputer/putil");
class EngPortalService extends AdvancedBase { class EngPortalService extends AdvancedBase {
static MODULES = { static MODULES = {

View File

@ -16,7 +16,7 @@
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
const { AdvancedBase } = require("@heyputer/puter-js-common"); const { AdvancedBase } = require("@heyputer/putil");
const { Context } = require("../util/context"); const { Context } = require("../util/context");
const { ContextAwareFeature } = require("../traits/ContextAwareFeature"); const { ContextAwareFeature } = require("../traits/ContextAwareFeature");
const { OtelFeature } = require("../traits/OtelFeature"); const { OtelFeature } = require("../traits/OtelFeature");

View File

@ -16,7 +16,7 @@
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
const { AdvancedBase } = require("@heyputer/puter-js-common"); const { AdvancedBase } = require("@heyputer/putil");
const BaseService = require("./BaseService"); const BaseService = require("./BaseService");
class MapCollection extends AdvancedBase { class MapCollection extends AdvancedBase {

View File

@ -16,7 +16,7 @@
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
const { AdvancedBase } = require("@heyputer/puter-js-common"); const { AdvancedBase } = require("@heyputer/putil");
class ServicePatch extends AdvancedBase { class ServicePatch extends AdvancedBase {
patch ({ original_service }) { patch ({ original_service }) {

View File

@ -16,7 +16,7 @@
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
const { AdvancedBase } = require("@heyputer/puter-js-common"); const { AdvancedBase } = require("@heyputer/putil");
class StorageService extends AdvancedBase { class StorageService extends AdvancedBase {
constructor ({ services }) { constructor ({ services }) {

View File

@ -16,7 +16,7 @@
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
const { AdvancedBase } = require("@heyputer/puter-js-common"); const { AdvancedBase } = require("@heyputer/putil");
class WSPushService extends AdvancedBase { class WSPushService extends AdvancedBase {
static MODULES = { static MODULES = {

View File

@ -16,7 +16,7 @@
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
const { AdvancedBase } = require("@heyputer/puter-js-common"); const { AdvancedBase } = require("@heyputer/putil");
const BaseService = require("../BaseService"); const BaseService = require("../BaseService");
const { Context } = require("../../util/context"); const { Context } = require("../../util/context");
const config = require("../../config"); const config = require("../../config");

View File

@ -16,7 +16,7 @@
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
const { AdvancedBase } = require("@heyputer/puter-js-common"); const { AdvancedBase } = require("@heyputer/putil");
const { Context } = require("../../util/context"); const { Context } = require("../../util/context");
const { get_user, get_app } = require("../../helpers"); const { get_user, get_app } = require("../../helpers");
const config = require("../../config"); const config = require("../../config");

View File

@ -16,7 +16,7 @@
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
const { AdvancedBase } = require("@heyputer/puter-js-common"); const { AdvancedBase } = require("@heyputer/putil");
const BaseService = require("../BaseService"); const BaseService = require("../BaseService");
const { DB_WRITE, DB_READ } = require("./consts"); const { DB_WRITE, DB_READ } = require("./consts");

View File

@ -23,7 +23,7 @@ const { TypedValue } = require("./meta/Runtime");
const BaseService = require("../BaseService"); const BaseService = require("../BaseService");
const { Driver } = require("../../definitions/Driver"); const { Driver } = require("../../definitions/Driver");
const { PermissionUtil } = require("../auth/PermissionService"); const { PermissionUtil } = require("../auth/PermissionService");
const { Invoker } = require("@heyputer/puter-js-common/src/libs/invoker"); const { Invoker } = require("../../../../putil/src/libs/invoker");
const { get_user } = require("../../helpers"); const { get_user } = require("../../helpers");
/** /**

View File

@ -16,7 +16,7 @@
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
const { AdvancedBase } = require("@heyputer/puter-js-common"); const { AdvancedBase } = require("@heyputer/putil");
const { Context } = require("../../util/context"); const { Context } = require("../../util/context");
const { MultiValue } = require("../../util/multivalue"); const { MultiValue } = require("../../util/multivalue");
const { stream_to_buffer } = require("../../util/streamutil"); const { stream_to_buffer } = require("../../util/streamutil");

View File

@ -16,7 +16,7 @@
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
const { BasicBase } = require("@heyputer/puter-js-common/src/bases/BasicBase"); const { BasicBase } = require("../../../../../putil/src/bases/BasicBase");
const types = require("../types"); const types = require("../types");
const { hash_serializable_object, stringify_serializable_object } = require("../../../util/datautil"); const { hash_serializable_object, stringify_serializable_object } = require("../../../util/datautil");

View File

@ -16,7 +16,7 @@
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
const { BasicBase } = require("@heyputer/puter-js-common/src/bases/BasicBase"); const { BasicBase } = require("../../../../../putil/src/bases/BasicBase");
const { TypeSpec } = require("./Construct"); const { TypeSpec } = require("./Construct");
class RuntimeEntity extends BasicBase { class RuntimeEntity extends BasicBase {

View File

@ -16,7 +16,7 @@
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
const { AdvancedBase } = require("@heyputer/puter-js-common"); const { AdvancedBase } = require("@heyputer/putil");
const { is_valid_path } = require("../../filesystem/validation"); const { is_valid_path } = require("../../filesystem/validation");
const { is_valid_url, is_valid_uuid4 } = require("../../helpers"); const { is_valid_url, is_valid_uuid4 } = require("../../helpers");
const { FileFacade } = require("./FileFacade"); const { FileFacade } = require("./FileFacade");

View File

@ -17,7 +17,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
const TeePromise = require("@heyputer/multest/src/util/TeePromise"); const TeePromise = require("@heyputer/multest/src/util/TeePromise");
const { AdvancedBase } = require("@heyputer/puter-js-common"); const { AdvancedBase } = require("@heyputer/putil");
const { FileTracker } = require("./FileTracker"); const { FileTracker } = require("./FileTracker");
const { pausing_tee } = require("../../util/streamutil"); const { pausing_tee } = require("../../util/streamutil");

View File

@ -16,7 +16,7 @@
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
const { AdvancedBase } = require("@heyputer/puter-js-common"); const { AdvancedBase } = require("@heyputer/putil");
const APIError = require("../../api/APIError"); const APIError = require("../../api/APIError");
const { Context } = require("../../util/context"); const { Context } = require("../../util/context");
const BaseService = require("../BaseService"); const BaseService = require("../BaseService");

View File

@ -22,7 +22,7 @@
const axios = require('axios'); const axios = require('axios');
const { TeePromise } = require("../../util/promise"); const { TeePromise } = require("../../util/promise");
const { AdvancedBase } = require('@heyputer/puter-js-common'); const { AdvancedBase } = require('@heyputer/putil');
const FormData = require("form-data"); const FormData = require("form-data");
const { stream_to_the_void, buffer_to_stream } = require('../../util/streamutil'); const { stream_to_the_void, buffer_to_stream } = require('../../util/streamutil');
const BaseService = require('../BaseService'); const BaseService = require('../BaseService');

View File

@ -16,7 +16,7 @@
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
const { AdvancedBase } = require("@heyputer/puter-js-common"); const { AdvancedBase } = require("@heyputer/putil");
/** /**
* MutliValue represents a subject with multiple values or a value with multiple * MutliValue represents a subject with multiple values or a value with multiple

View File

@ -16,7 +16,7 @@
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
const { AdvancedBase } = require("@heyputer/puter-js-common"); const { AdvancedBase } = require("@heyputer/putil");
/** /**
* PathBuilder implements the builder pattern for building paths. * PathBuilder implements the builder pattern for building paths.

View File

@ -16,7 +16,7 @@
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
const { AdvancedBase } = require("@heyputer/puter-js-common"); const { AdvancedBase } = require("@heyputer/putil");
const useapi = require("useapi"); const useapi = require("useapi");
const { BaseService } = require("../exports"); const { BaseService } = require("../exports");
const CoreModule = require("../src/CoreModule"); const CoreModule = require("../src/CoreModule");

View File

@ -16,7 +16,7 @@
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
import { PosixError } from '@heyputer/puter-js-common/src/PosixError.js'; import { PosixError } from '@heyputer/putil/src/PosixError.js';
import path_ from 'path-browserify'; import path_ from 'path-browserify';
let debug = false; let debug = false;

View File

@ -20,7 +20,7 @@ import fs from 'fs';
import path_ from 'path'; import path_ from 'path';
import modeString from 'fs-mode-to-string'; import modeString from 'fs-mode-to-string';
import { ErrorCodes, PosixError } from '@heyputer/puter-js-common/src/PosixError.js'; import { ErrorCodes, PosixError } from '@heyputer/putil/src/PosixError.js';
// DRY: Almost the same as puter/filesystem.js // DRY: Almost the same as puter/filesystem.js
function wrapAPIs(apis) { function wrapAPIs(apis) {

View File

@ -16,7 +16,7 @@
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
import { ErrorCodes, PosixError } from '@heyputer/puter-js-common/src/PosixError.js'; import { ErrorCodes, PosixError } from '@heyputer/putil/src/PosixError.js';
// DRY: Almost the same as node/filesystem.js // DRY: Almost the same as node/filesystem.js
function wrapAPIs(apis) { function wrapAPIs(apis) {

View File

@ -16,7 +16,7 @@
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
import { ErrorCodes, ErrorMetadata, errorFromIntegerCode } from '@heyputer/puter-js-common/src/PosixError.js'; import { ErrorCodes, ErrorMetadata, errorFromIntegerCode } from '@heyputer/putil/src/PosixError.js';
import { Exit } from './coreutil_lib/exit.js'; import { Exit } from './coreutil_lib/exit.js';
const maxErrorNameLength = Object.keys(ErrorCodes) const maxErrorNameLength = Object.keys(ErrorCodes)

View File

@ -18,7 +18,7 @@
*/ */
import { Exit } from './coreutil_lib/exit.js'; import { Exit } from './coreutil_lib/exit.js';
import { resolveRelativePath } from '../../util/path.js'; import { resolveRelativePath } from '../../util/path.js';
import { ErrorCodes } from '@heyputer/puter-js-common/src/PosixError.js'; import { ErrorCodes } from '@heyputer/putil/src/PosixError.js';
export default { export default {
name: 'touch', name: 'touch',

View File

@ -19,7 +19,7 @@
import assert from 'assert'; import assert from 'assert';
import { MakeTestContext } from './harness.js' import { MakeTestContext } from './harness.js'
import builtins from '../../src/puter-shell/coreutils/__exports__.js'; import builtins from '../../src/puter-shell/coreutils/__exports__.js';
import { ErrorCodes, ErrorMetadata } from '@heyputer/puter-js-common/src/PosixError.js'; import { ErrorCodes, ErrorMetadata } from '@heyputer/putil/src/PosixError.js';
export const runErrnoTests = () => { export const runErrnoTests = () => {
describe('errno', function () { describe('errno', function () {

View File

@ -16,7 +16,7 @@
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
import { libs } from '@heyputer/puter-js-common'; import { libs } from '@heyputer/putil';
const { TeePromise, raceCase } = libs.promise; const { TeePromise, raceCase } = libs.promise;
const encoder = new TextEncoder(); const encoder = new TextEncoder();

View File

@ -1,5 +1,5 @@
{ {
"name": "@heyputer/puter-js-common", "name": "@heyputer/putil",
"version": "1.0.0", "version": "1.0.0",
"description": "", "description": "",
"main": "index.js", "main": "index.js",