mirror of
https://github.com/HeyPuter/puter.git
synced 2025-01-23 06:00:21 +08:00
Rename workspace modules to avoid confusion
This commit is contained in:
parent
74e213a534
commit
65a73b5b45
4171
package-lock.json
generated
4171
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -6,12 +6,10 @@
|
||||
"scripts": {
|
||||
"test": "npx mocha"
|
||||
},
|
||||
"workspaces": [
|
||||
"packages/*"
|
||||
],
|
||||
"dependencies": {
|
||||
"@heyputer/kv.js": "^0.1.3",
|
||||
"@heyputer/multest": "^0.0.2",
|
||||
"@heyputer/puter-js-common": "^1.0.0",
|
||||
"@opentelemetry/api": "^1.4.1",
|
||||
"@opentelemetry/auto-instrumentations-node": "^0.43.0",
|
||||
"@opentelemetry/exporter-trace-otlp-grpc": "^0.40.0",
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "puter-js-common",
|
||||
"name": "@heyputer/puter-js-common",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
|
@ -16,7 +16,7 @@
|
||||
* 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/>.
|
||||
*/
|
||||
const { AdvancedBase } = require("puter-js-common");
|
||||
const { AdvancedBase } = require("@heyputer/puter-js-common");
|
||||
const { Context } = require('./util/context');
|
||||
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
* 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/>.
|
||||
*/
|
||||
const { AdvancedBase } = require("puter-js-common");
|
||||
const { AdvancedBase } = require("@heyputer/puter-js-common");
|
||||
|
||||
class DatabaseModule extends AdvancedBase {
|
||||
async install (context) {
|
||||
|
@ -16,7 +16,7 @@
|
||||
* 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/>.
|
||||
*/
|
||||
const { AdvancedBase } = require("puter-js-common");
|
||||
const { AdvancedBase } = require("@heyputer/puter-js-common");
|
||||
const { Context } = require('./util/context');
|
||||
|
||||
class Kernel extends AdvancedBase {
|
||||
|
@ -16,7 +16,7 @@
|
||||
* 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/>.
|
||||
*/
|
||||
const { AdvancedBase } = require("puter-js-common");
|
||||
const { AdvancedBase } = require("@heyputer/puter-js-common");
|
||||
|
||||
class LocalDiskStorageModule extends AdvancedBase {
|
||||
async install (context) {
|
||||
|
@ -16,7 +16,7 @@
|
||||
* 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/>.
|
||||
*/
|
||||
const { AdvancedBase } = require("puter-js-common");
|
||||
const { AdvancedBase } = require("@heyputer/puter-js-common");
|
||||
|
||||
class PuterDriversModule extends AdvancedBase {
|
||||
async install () {}
|
||||
|
@ -1,4 +1,4 @@
|
||||
const { AdvancedBase } = require("puter-js-common");
|
||||
const { AdvancedBase } = require("@heyputer/puter-js-common");
|
||||
const config = require("./config");
|
||||
|
||||
class SelfhostedModule extends AdvancedBase {
|
||||
|
@ -16,7 +16,7 @@
|
||||
* 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/>.
|
||||
*/
|
||||
const { AdvancedBase } = require("puter-js-common");
|
||||
const { AdvancedBase } = require("@heyputer/puter-js-common");
|
||||
|
||||
class ThirdPartyDriversModule extends AdvancedBase {
|
||||
// constructor () {
|
||||
|
@ -16,7 +16,7 @@
|
||||
* 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/>.
|
||||
*/
|
||||
const { AdvancedBase } = require("puter-js-common");
|
||||
const { AdvancedBase } = require("@heyputer/puter-js-common");
|
||||
const { quot } = require("../util/strutil");
|
||||
const { TechnicalError } = require("../errors/TechnicalError");
|
||||
const { print_error_help } = require("../errors/error_help_details");
|
||||
|
@ -16,7 +16,7 @@
|
||||
* 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/>.
|
||||
*/
|
||||
const { AdvancedBase } = require("puter-js-common");
|
||||
const { AdvancedBase } = require("@heyputer/puter-js-common");
|
||||
const { quot } = require("../util/strutil");
|
||||
|
||||
class ConfigLoader extends AdvancedBase {
|
||||
|
@ -27,7 +27,7 @@ const SystemFSEntryService = require('./storage/SystemFSEntryService.js');
|
||||
const PerformanceMonitor = require('../monitor/PerformanceMonitor.js');
|
||||
const { NodePathSelector, NodeUIDSelector, NodeInternalIDSelector } = require('./node/selectors.js');
|
||||
const FSNodeContext = require('./FSNodeContext.js');
|
||||
const { AdvancedBase } = require('puter-js-common');
|
||||
const { AdvancedBase } = require('@heyputer/puter-js-common');
|
||||
const { Context } = require('../util/context.js');
|
||||
const { simple_retry } = require('../util/retryutil.js');
|
||||
const APIError = require('../api/APIError.js');
|
||||
|
@ -16,7 +16,7 @@
|
||||
* 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/>.
|
||||
*/
|
||||
const { AdvancedBase } = require('puter-js-common');
|
||||
const { AdvancedBase } = require('@heyputer/puter-js-common');
|
||||
const PathResolver = require('../../routers/filesystem_api/batch/PathResolver');
|
||||
const commands = require('./commands').commands;
|
||||
const { WorkUnit } = require('../../services/runtime-analysis/ExpectationService');
|
||||
|
@ -16,7 +16,7 @@
|
||||
* 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/>.
|
||||
*/
|
||||
const { AdvancedBase } = require("puter-js-common");
|
||||
const { AdvancedBase } = require("@heyputer/puter-js-common");
|
||||
const { AsyncProviderTrait } = require("../../traits/AsyncProviderTrait");
|
||||
const { HLMkdir, QuickMkdir } = require("../hl_operations/hl_mkdir");
|
||||
const { Context } = require("../../util/context");
|
||||
|
@ -16,7 +16,7 @@
|
||||
* 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/>.
|
||||
*/
|
||||
const { AdvancedBase } = require("puter-js-common");
|
||||
const { AdvancedBase } = require("@heyputer/puter-js-common");
|
||||
const { id2path } = require("../../helpers");
|
||||
|
||||
const { PuterPath } = require("../lib/PuterPath");
|
||||
|
@ -16,7 +16,7 @@
|
||||
* 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/>.
|
||||
*/
|
||||
const { AdvancedBase } = require("puter-js-common");
|
||||
const { AdvancedBase } = require("@heyputer/puter-js-common");
|
||||
const { WeakConstructorTrait } = require("../traits/WeakConstructorTrait");
|
||||
const { Eq, And } = require("./query/query");
|
||||
const { Entity } = require("./entitystorage/Entity");
|
||||
|
@ -16,7 +16,7 @@
|
||||
* 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/>.
|
||||
*/
|
||||
const { AdvancedBase } = require("puter-js-common");
|
||||
const { AdvancedBase } = require("@heyputer/puter-js-common");
|
||||
const { instance_ } = require("../../monitor/PerformanceMonitor");
|
||||
const { WeakConstructorTrait } = require("../../traits/WeakConstructorTrait");
|
||||
const { Property } = require("./Property");
|
||||
|
@ -16,7 +16,7 @@
|
||||
* 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/>.
|
||||
*/
|
||||
const { AdvancedBase } = require("puter-js-common");
|
||||
const { AdvancedBase } = require("@heyputer/puter-js-common");
|
||||
const { WeakConstructorTrait } = require("../../traits/WeakConstructorTrait");
|
||||
|
||||
class PropType extends AdvancedBase {
|
||||
|
@ -16,7 +16,7 @@
|
||||
* 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/>.
|
||||
*/
|
||||
const { AdvancedBase } = require("puter-js-common");
|
||||
const { AdvancedBase } = require("@heyputer/puter-js-common");
|
||||
const { WeakConstructorTrait } = require("../../traits/WeakConstructorTrait");
|
||||
|
||||
class Property extends AdvancedBase {
|
||||
|
@ -16,7 +16,7 @@
|
||||
* 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/>.
|
||||
*/
|
||||
const { AdvancedBase } = require("puter-js-common");
|
||||
const { AdvancedBase } = require("@heyputer/puter-js-common");
|
||||
const { WeakConstructorTrait } = require("../../traits/WeakConstructorTrait");
|
||||
const { Context } = require("../../util/context");
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
* 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/>.
|
||||
*/
|
||||
const { AdvancedBase } = require("puter-js-common");
|
||||
const { AdvancedBase } = require("@heyputer/puter-js-common");
|
||||
const { WeakConstructorTrait } = require("../../traits/WeakConstructorTrait");
|
||||
|
||||
class Entity extends AdvancedBase {
|
||||
|
@ -16,7 +16,7 @@
|
||||
* 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/>.
|
||||
*/
|
||||
const { AdvancedBase } = require("puter-js-common");
|
||||
const { AdvancedBase } = require("@heyputer/puter-js-common");
|
||||
const { BaseES } = require("./BaseES");
|
||||
|
||||
const APIError = require("../../api/APIError");
|
||||
|
@ -16,7 +16,7 @@
|
||||
* 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/>.
|
||||
*/
|
||||
const { AdvancedBase } = require("puter-js-common");
|
||||
const { AdvancedBase } = require("@heyputer/puter-js-common");
|
||||
const { BaseES } = require("./BaseES");
|
||||
|
||||
const APIError = require("../../api/APIError");
|
||||
|
@ -16,7 +16,7 @@
|
||||
* 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/>.
|
||||
*/
|
||||
const { AdvancedBase } = require("puter-js-common");
|
||||
const { AdvancedBase } = require("@heyputer/puter-js-common");
|
||||
const { WeakConstructorTrait } = require("../../traits/WeakConstructorTrait");
|
||||
|
||||
class Predicate extends AdvancedBase {
|
||||
|
@ -16,7 +16,7 @@
|
||||
* 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/>.
|
||||
*/
|
||||
const { AdvancedBase } = require("puter-js-common");
|
||||
const { AdvancedBase } = require("@heyputer/puter-js-common");
|
||||
const api_error_handler = require("../../api/api_error_handler");
|
||||
const config = require("../../config");
|
||||
const { get_user, get_app, id2path } = require("../../helpers");
|
||||
|
@ -16,7 +16,7 @@
|
||||
* 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/>.
|
||||
*/
|
||||
const { AdvancedBase } = require("puter-js-common");
|
||||
const { AdvancedBase } = require("@heyputer/puter-js-common");
|
||||
|
||||
const NOOP = async () => {};
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
* 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/>.
|
||||
*/
|
||||
const { AdvancedBase } = require("puter-js-common");
|
||||
const { AdvancedBase } = require("@heyputer/puter-js-common");
|
||||
|
||||
class Emailservice extends AdvancedBase {
|
||||
static MODULES = {
|
||||
|
@ -16,7 +16,7 @@
|
||||
* 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/>.
|
||||
*/
|
||||
const { AdvancedBase } = require("puter-js-common");
|
||||
const { AdvancedBase } = require("@heyputer/puter-js-common");
|
||||
|
||||
class EngPortalService extends AdvancedBase {
|
||||
static MODULES = {
|
||||
|
@ -16,7 +16,7 @@
|
||||
* 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/>.
|
||||
*/
|
||||
const { AdvancedBase } = require("puter-js-common");
|
||||
const { AdvancedBase } = require("@heyputer/puter-js-common");
|
||||
const { Context } = require("../util/context");
|
||||
const { ContextAwareTrait } = require("../traits/ContextAwareTrait");
|
||||
const { OtelTrait } = require("../traits/OtelTrait");
|
||||
|
@ -16,7 +16,7 @@
|
||||
* 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/>.
|
||||
*/
|
||||
const { AdvancedBase } = require("puter-js-common");
|
||||
const { AdvancedBase } = require("@heyputer/puter-js-common");
|
||||
const BaseService = require("./BaseService");
|
||||
|
||||
class MapCollection extends AdvancedBase {
|
||||
|
@ -16,7 +16,7 @@
|
||||
* 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/>.
|
||||
*/
|
||||
const { AdvancedBase } = require("puter-js-common");
|
||||
const { AdvancedBase } = require("@heyputer/puter-js-common");
|
||||
|
||||
class StorageService extends AdvancedBase {
|
||||
constructor ({ services }) {
|
||||
|
@ -16,7 +16,7 @@
|
||||
* 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/>.
|
||||
*/
|
||||
const { AdvancedBase } = require("puter-js-common");
|
||||
const { AdvancedBase } = require("@heyputer/puter-js-common");
|
||||
|
||||
class WSPushService extends AdvancedBase {
|
||||
static MODULES = {
|
||||
|
@ -16,7 +16,7 @@
|
||||
* 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/>.
|
||||
*/
|
||||
const { AdvancedBase } = require("puter-js-common");
|
||||
const { AdvancedBase } = require("@heyputer/puter-js-common");
|
||||
const BaseService = require("../BaseService");
|
||||
const { Context } = require("../../util/context");
|
||||
const config = require("../../config");
|
||||
|
@ -16,7 +16,7 @@
|
||||
* 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/>.
|
||||
*/
|
||||
const { AdvancedBase } = require("puter-js-common");
|
||||
const { AdvancedBase } = require("@heyputer/puter-js-common");
|
||||
const { Context } = require("../../util/context");
|
||||
const { get_user, get_app } = require("../../helpers");
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
* 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/>.
|
||||
*/
|
||||
const { AdvancedBase } = require("puter-js-common");
|
||||
const { AdvancedBase } = require("@heyputer/puter-js-common");
|
||||
const BaseService = require("../BaseService");
|
||||
|
||||
class BaseDatabaseAccessService extends BaseService {
|
||||
|
@ -16,7 +16,7 @@
|
||||
* 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/>.
|
||||
*/
|
||||
const { AdvancedBase } = require("puter-js-common");
|
||||
const { AdvancedBase } = require("@heyputer/puter-js-common");
|
||||
const { Context } = require("../../util/context");
|
||||
const APIError = require("../../api/APIError");
|
||||
const { DriverError } = require("./DriverError");
|
||||
|
@ -16,7 +16,7 @@
|
||||
* 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/>.
|
||||
*/
|
||||
const { AdvancedBase } = require("puter-js-common");
|
||||
const { AdvancedBase } = require("@heyputer/puter-js-common");
|
||||
const { Context } = require("../../util/context");
|
||||
const { MultiValue } = require("../../util/multivalue");
|
||||
const { stream_to_buffer } = require("../../util/streamutil");
|
||||
|
@ -16,7 +16,7 @@
|
||||
* 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/>.
|
||||
*/
|
||||
const { AdvancedBase } = require("puter-js-common");
|
||||
const { AdvancedBase } = require("@heyputer/puter-js-common");
|
||||
const { Context } = require("../../../util/context");
|
||||
const APIError = require("../../../api/APIError");
|
||||
const { AppUnderUserActorType, Actor, UserActorType } = require("../../auth/Actor");
|
||||
|
@ -16,7 +16,7 @@
|
||||
* 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/>.
|
||||
*/
|
||||
const { AdvancedBase } = require("puter-js-common");
|
||||
const { AdvancedBase } = require("@heyputer/puter-js-common");
|
||||
|
||||
const ENDPOINT = 'https://api.puter.com/drivers/call';
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
* 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/>.
|
||||
*/
|
||||
const { BasicBase } = require("puter-js-common/src/bases/BasicBase");
|
||||
const { BasicBase } = require("@heyputer/puter-js-common/src/bases/BasicBase");
|
||||
const types = require("../types");
|
||||
const { hash_serializable_object, stringify_serializable_object } = require("../../../util/datautil");
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
* 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/>.
|
||||
*/
|
||||
const { BasicBase } = require("puter-js-common/src/bases/BasicBase");
|
||||
const { BasicBase } = require("@heyputer/puter-js-common/src/bases/BasicBase");
|
||||
const { TypeSpec } = require("./Construct");
|
||||
|
||||
class RuntimeEntity extends BasicBase {
|
||||
|
@ -16,7 +16,7 @@
|
||||
* 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/>.
|
||||
*/
|
||||
const { AdvancedBase } = require("puter-js-common");
|
||||
const { AdvancedBase } = require("@heyputer/puter-js-common");
|
||||
const { is_valid_path } = require("../../filesystem/validation");
|
||||
const { is_valid_url, is_valid_uuid4 } = require("../../helpers");
|
||||
const { FileFacade } = require("./FileFacade");
|
||||
|
@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
const TeePromise = require("@heyputer/multest/src/util/TeePromise");
|
||||
const { AdvancedBase } = require("puter-js-common");
|
||||
const { AdvancedBase } = require("@heyputer/puter-js-common");
|
||||
const { FileTracker } = require("./FileTracker");
|
||||
const { pausing_tee } = require("../../util/streamutil");
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
* 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/>.
|
||||
*/
|
||||
const { AdvancedBase } = require("puter-js-common");
|
||||
const { AdvancedBase } = require("@heyputer/puter-js-common");
|
||||
const APIError = require("../../api/APIError");
|
||||
const { Context } = require("../../util/context");
|
||||
const BaseService = require("../BaseService");
|
||||
|
@ -22,7 +22,7 @@
|
||||
const axios = require('axios');
|
||||
|
||||
const { TeePromise } = require("../../util/promise");
|
||||
const { AdvancedBase } = require('puter-js-common');
|
||||
const { AdvancedBase } = require('@heyputer/puter-js-common');
|
||||
const FormData = require("form-data");
|
||||
const { stream_to_the_void, buffer_to_stream } = require('../../util/streamutil');
|
||||
const BaseService = require('../BaseService');
|
||||
|
@ -16,7 +16,7 @@
|
||||
* 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/>.
|
||||
*/
|
||||
const { AdvancedBase } = require("puter-js-common");
|
||||
const { AdvancedBase } = require("@heyputer/puter-js-common");
|
||||
|
||||
/**
|
||||
* MutliValue represents a subject with multiple values or a value with multiple
|
||||
|
4
packages/phoenix/package-lock.json
generated
4
packages/phoenix/package-lock.json
generated
@ -1,11 +1,11 @@
|
||||
{
|
||||
"name": "dev-ansi-terminal",
|
||||
"name": "@heyputer/phoenix",
|
||||
"version": "0.0.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "dev-ansi-terminal",
|
||||
"name": "@heyputer/phoenix",
|
||||
"version": "0.0.0",
|
||||
"license": "AGPL-3.0-only",
|
||||
"workspaces": [
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "dev-ansi-terminal",
|
||||
"name": "@heyputer/phoenix",
|
||||
"version": "0.0.0",
|
||||
"description": "ANSI Terminal for Puter",
|
||||
"main": "exports.js",
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "puter-js-common",
|
||||
"name": "@heyputer/puter-js-common",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "puter",
|
||||
"name": "@heyputer/puterjs",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "@putersh/terminal-emulator",
|
||||
"name": "@heyputer/terminal",
|
||||
"version": "0.0.0",
|
||||
"description": "ANSI Terminal for Puter",
|
||||
"main": "exports.js",
|
||||
|
@ -93,14 +93,6 @@ const early_init_errors = [
|
||||
}
|
||||
];
|
||||
|
||||
const newstuff = {
|
||||
// Nullish coalescing operator
|
||||
nco: (...a) => a.reduce((acc, val) => acc == undefined ? val : acc),
|
||||
// Optional chaining
|
||||
oc: (obj, ...keys) => keys.reduce((acc, key) => acc ? acc[key] : undefined, obj),
|
||||
oc_call: (maybe_fn, ...args) => maybe_fn ? maybe_fn(...args) : undefined,
|
||||
};1
|
||||
|
||||
const _print_error_help = (error_help) => {
|
||||
const lines = [];
|
||||
lines.push(nco(error_help.title, error_help.text));
|
||||
@ -128,7 +120,8 @@ const _print_error_help = (error_help) => {
|
||||
await main();
|
||||
} catch (e) {
|
||||
for ( const error_help of early_init_errors ) {
|
||||
if ( oc_call(oc(e, message, includes), error_help.text) ) {
|
||||
const message = e && e.message;
|
||||
if ( e.message && e.message.includes(error_help.text) ) {
|
||||
_print_error_help(error_help);
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user