From afc17e87caa28b0ba2fdb22d864609e967079f5d Mon Sep 17 00:00:00 2001 From: Steven Date: Tue, 19 Aug 2025 10:49:14 -0500 Subject: [PATCH 1/4] feat(api): Dependency Updates and Route Management Improvements - Dependencies in `package.json` and `package-lock.json` have been updated to ensure compatibility and performance. - Improvements have been made to domain validation routes and asset management in the API, optimizing code structure and readability. --- app/api/domain-validation/route.ts | 16 ++ app/api/domain-validation/verify-acm/route.ts | 16 ++ app/api/domain-validation/verify/route.ts | 16 ++ .../[storeId]/assets/[...path]/route.ts | 16 ++ .../[storeId]/cache/invalidate/route.ts | 16 ++ app/api/stores/[storeId]/cart/route.ts | 16 ++ .../[storeId]/checkout/complete/route.ts | 16 ++ .../stores/[storeId]/checkout/direct/route.ts | 16 ++ .../stores/[storeId]/checkout/start/route.ts | 16 ++ .../stores/[storeId]/custom-domain/route.ts | 16 ++ .../stores/[storeId]/products/filter/route.ts | 16 ++ app/api/stores/[storeId]/search/route.ts | 16 ++ .../stores/[storeId]/themes/confirm/route.ts | 16 ++ app/api/stores/[storeId]/themes/route.ts | 16 ++ .../stores/[storeId]/themes/upload/route.ts | 16 ++ app/api/stores/template-dev/route.ts | 16 ++ app/api/stores/template-dev/ws/route.ts | 16 ++ app/api/stores/template/route.ts | 16 ++ lib/cookies/cookiesOption.ts | 16 ++ lib/utils.ts | 16 ++ lib/utils/next-cors.ts | 16 ++ lib/utils/secure-logger.ts | 16 ++ lib/zod-schemas/api-keys.ts | 16 ++ lib/zod-schemas/email-change.ts | 16 ++ lib/zod-schemas/first-step.ts | 16 ++ lib/zod-schemas/navigation.ts | 16 ++ lib/zod-schemas/page.ts | 16 ++ lib/zod-schemas/password-change.ts | 16 ++ lib/zod-schemas/product-schema.ts | 16 ++ lib/zod-schemas/schemas.ts | 16 ++ lib/zod-schemas/store-profile-schema.ts | 16 ++ middlewares/auth/auth.ts | 16 ++ middlewares/domain-handling/domainHandler.ts | 16 ++ middlewares/ownership/collectionOwnership.ts | 16 ++ middlewares/ownership/pagesOwnership.ts | 16 ++ middlewares/ownership/productOwnership.ts | 16 ++ middlewares/store-access/store.ts | 16 ++ middlewares/store-access/storeAccess.ts | 16 ++ middlewares/subscription/subscription.ts | 16 ++ package-lock.json | 1 + package.json | 1 + renderer-engine/config/page-config.ts | 16 ++ renderer-engine/config/route-matchers.ts | 16 ++ renderer-engine/exports.ts | 16 ++ .../factories/store-renderer-factory.ts | 16 ++ renderer-engine/index.ts | 16 ++ renderer-engine/instances.ts | 16 ++ renderer-engine/lib/inject-assets.ts | 16 ++ renderer-engine/lib/logger.ts | 16 ++ renderer-engine/liquid/engine.ts | 16 ++ renderer-engine/liquid/filters.ts | 16 ++ .../liquid/filters/base-filters.ts | 16 ++ .../liquid/filters/cart-filters.ts | 16 ++ .../liquid/filters/data-access-filters.ts | 16 ++ .../liquid/filters/ecommerce-filters.ts | 16 ++ .../liquid/filters/html-filters.ts | 16 ++ .../liquid/filters/money-filters.ts | 16 ++ renderer-engine/liquid/index.ts | 16 ++ renderer-engine/liquid/tags/core/index.ts | 16 ++ .../liquid/tags/core/paginate-tag.ts | 16 ++ .../liquid/tags/core/render-tag.ts | 16 ++ .../liquid/tags/core/section-tag.ts | 16 ++ renderer-engine/liquid/tags/data/index.ts | 16 ++ .../liquid/tags/data/javascript-tag.ts | 16 ++ .../liquid/tags/data/schema-tag.ts | 16 ++ .../liquid/tags/filters/data-fetcher.ts | 16 ++ .../liquid/tags/filters/filters-tag.ts | 16 ++ .../liquid/tags/filters/html-generator.ts | 16 ++ renderer-engine/liquid/tags/filters/index.ts | 16 ++ .../tags/filters/javascript-generator.ts | 16 ++ .../liquid/tags/filters/js/dom-manager.js | 16 ++ .../liquid/tags/filters/js/event-handler.js | 16 ++ .../liquid/tags/filters/js/filter-api.js | 16 ++ .../liquid/tags/filters/js/filter-config.js | 16 ++ .../liquid/tags/filters/js/filter-main.js | 16 ++ .../liquid/tags/filters/js/filter-state.js | 16 ++ .../liquid/tags/filters/js/price-slider.js | 16 ++ .../tags/filters/js/product-renderer.js | 16 ++ .../tags/filters/js/template-manager.js | 16 ++ .../liquid/tags/filters/js/url-loader.js | 16 ++ .../liquid/tags/filters/js/utils.js | 16 ++ .../liquid/tags/filters/options-parser.ts | 16 ++ renderer-engine/liquid/tags/filters/types.ts | 16 ++ renderer-engine/liquid/tags/forms/form-tag.ts | 16 ++ renderer-engine/liquid/tags/forms/index.ts | 16 ++ renderer-engine/liquid/tags/index.ts | 16 ++ renderer-engine/liquid/tags/styling/index.ts | 16 ++ .../liquid/tags/styling/script-tag.ts | 16 ++ .../liquid/tags/styling/style-tag.ts | 16 ++ .../renderers/dynamic-page-renderer.ts | 16 ++ .../pipeline-steps/build-context-step.ts | 16 ++ .../renderers/pipeline-steps/index.ts | 16 ++ .../pipeline-steps/initialize-engine-step.ts | 16 ++ .../pipeline-steps/load-data-step.ts | 16 ++ .../pipeline-steps/render-content-step.ts | 16 ++ .../pipeline-steps/resolve-store-step.ts | 16 ++ .../core/cache/cache-invalidation-service.ts | 16 ++ .../services/core/cache/cache-keys.ts | 16 ++ .../services/core/cache/cache-manager.ts | 16 ++ renderer-engine/services/core/cache/index.ts | 16 ++ .../services/core/data-transformer.ts | 16 ++ .../services/core/domain-resolver.ts | 16 ++ .../services/core/navigation-service.ts | 16 ++ .../services/errors/error-messages.ts | 16 ++ .../services/errors/error-renderer.ts | 16 ++ .../services/errors/error-templates.ts | 16 ++ .../services/errors/error-utils.ts | 16 ++ .../services/fetchers/cart-fetcher.ts | 16 ++ .../fetchers/checkout-data-transformer.ts | 16 ++ .../services/fetchers/checkout-fetcher.ts | 16 ++ .../services/fetchers/collection-fetcher.ts | 16 ++ .../services/fetchers/data-fetcher.ts | 16 ++ .../services/fetchers/navigation-fetcher.ts | 16 ++ .../services/fetchers/page-fetcher.ts | 16 ++ .../services/fetchers/product-fetcher.ts | 16 ++ .../core/context-builder-helper.ts | 16 ++ .../page/data-loader/core/core-data-loader.ts | 16 ++ .../core/template-analyzer-helper.ts | 16 ++ .../page/data-loader/data-fetcher-helper.ts | 16 ++ .../data-loader/handlers/data-handlers.ts | 16 ++ .../handlers/response-processors.ts | 16 ++ .../services/page/data-loader/index.ts | 16 ++ .../pagination/pagination-builder-helper.ts | 16 ++ .../pagination/pagination-limit-extractor.ts | 16 ++ .../data-loader/search/search-data-loader.ts | 16 ++ .../search/search-limits-extractor.ts | 16 ++ .../services/page/dynamic-data-loader.ts | 16 ++ .../services/rendering/asset-collector.ts | 16 ++ .../services/rendering/global-context.ts | 16 ++ .../services/rendering/metadata-generator.ts | 16 ++ .../services/rendering/render-page-content.ts | 16 ++ .../services/rendering/section-renderer.ts | 16 ++ .../templates/analysis/template-analyzer.ts | 16 ++ .../parsing/liquid-syntax-detector.ts | 16 ++ .../templates/parsing/schema-parser.ts | 16 ++ .../sync/template-dev-synchronizer.ts | 16 ++ .../services/templates/template-loader.ts | 16 ++ .../services/themes/core/theme-processor.ts | 16 ++ .../services/themes/core/theme-validator.ts | 16 ++ renderer-engine/services/themes/index.ts | 16 ++ .../themes/storage/s3-storage-service.ts | 16 ++ .../services/themes/types/index.ts | 16 ++ .../services/themes/types/processing-types.ts | 16 ++ .../services/themes/types/theme-types.ts | 16 ++ .../services/themes/types/validation-types.ts | 16 ++ .../validation/rules/file-structure-rules.ts | 16 ++ .../validation/rules/liquid-syntax-rules.ts | 16 ++ .../validation/rules/performance-rules.ts | 16 ++ .../themes/validation/rules/security-rules.ts | 16 ++ .../themes/validation/utils/file-filters.ts | 16 ++ .../themes/validation/validation-engine.ts | 16 ++ renderer-engine/types/cart.ts | 16 ++ renderer-engine/types/checkout.ts | 16 ++ renderer-engine/types/index.ts | 16 ++ renderer-engine/types/liquid.ts | 16 ++ renderer-engine/types/page.ts | 16 ++ renderer-engine/types/product.ts | 16 ++ renderer-engine/types/store.ts | 16 ++ renderer-engine/types/template.ts | 16 ++ scripts/add-license-header.js | 171 ++++++++++++++++++ tenant-domains/config/security-config.ts | 16 ++ tenant-domains/index.ts | 16 ++ .../services/cloudfront/dns-verifier.ts | 16 ++ .../services/cloudfront/tenant-manager.ts | 16 ++ .../services/custom-domain-service.ts | 16 ++ .../services/domain/dns-http-verifier.ts | 16 ++ .../services/domain/domain-validator.ts | 16 ++ .../services/domain/token-generator.ts | 16 ++ .../services/ssl/certificate-manager.ts | 16 ++ utils/server/AmplifyServer.ts | 16 ++ utils/server/amplifyServerUtils.ts | 16 ++ utils/server/cdn-url.ts | 16 ++ utils/server/index.ts | 16 ++ 173 files changed, 2893 insertions(+) create mode 100644 scripts/add-license-header.js diff --git a/app/api/domain-validation/route.ts b/app/api/domain-validation/route.ts index f2aa37bb..77669ec6 100644 --- a/app/api/domain-validation/route.ts +++ b/app/api/domain-validation/route.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { NextRequest, NextResponse } from 'next/server'; import { CustomDomainService } from '@/tenant-domains/services/custom-domain-service'; import { getNextCorsHeaders } from '@/lib/utils/next-cors'; diff --git a/app/api/domain-validation/verify-acm/route.ts b/app/api/domain-validation/verify-acm/route.ts index 9f940402..eee5da7b 100644 --- a/app/api/domain-validation/verify-acm/route.ts +++ b/app/api/domain-validation/verify-acm/route.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { NextRequest, NextResponse } from 'next/server'; import { CertificateManager } from '@/tenant-domains/services/ssl/certificate-manager'; import { getNextCorsHeaders } from '@/lib/utils/next-cors'; diff --git a/app/api/domain-validation/verify/route.ts b/app/api/domain-validation/verify/route.ts index effa9dd4..1d31de14 100644 --- a/app/api/domain-validation/verify/route.ts +++ b/app/api/domain-validation/verify/route.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { NextRequest, NextResponse } from 'next/server'; import { CustomDomainService } from '@/tenant-domains/services/custom-domain-service'; import { SecurityConfig } from '@/tenant-domains/config/security-config'; diff --git a/app/api/stores/[storeId]/assets/[...path]/route.ts b/app/api/stores/[storeId]/assets/[...path]/route.ts index ff52fd57..1b1f64b3 100644 --- a/app/api/stores/[storeId]/assets/[...path]/route.ts +++ b/app/api/stores/[storeId]/assets/[...path]/route.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { getNextCorsHeaders } from '@/lib/utils/next-cors'; import { logger } from '@/renderer-engine/lib/logger'; import { GetObjectCommand, S3Client } from '@aws-sdk/client-s3'; diff --git a/app/api/stores/[storeId]/cache/invalidate/route.ts b/app/api/stores/[storeId]/cache/invalidate/route.ts index 1acddeaa..15ea57e5 100644 --- a/app/api/stores/[storeId]/cache/invalidate/route.ts +++ b/app/api/stores/[storeId]/cache/invalidate/route.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { getNextCorsHeaders } from '@/lib/utils/next-cors'; import { cacheInvalidationService, type ChangeType } from '@/renderer-engine/services/core/cache'; import { AuthGetCurrentUserServer, cookiesClient } from '@/utils/client/AmplifyUtils'; diff --git a/app/api/stores/[storeId]/cart/route.ts b/app/api/stores/[storeId]/cart/route.ts index 4c412387..5d045dfa 100644 --- a/app/api/stores/[storeId]/cart/route.ts +++ b/app/api/stores/[storeId]/cart/route.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { getCartCookieOptions } from '@/lib/cookies/cookiesOption'; import { getNextCorsHeaders } from '@/lib/utils/next-cors'; import { logger } from '@/renderer-engine/lib/logger'; diff --git a/app/api/stores/[storeId]/checkout/complete/route.ts b/app/api/stores/[storeId]/checkout/complete/route.ts index 3f15514a..4814a097 100644 --- a/app/api/stores/[storeId]/checkout/complete/route.ts +++ b/app/api/stores/[storeId]/checkout/complete/route.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { getNextCorsHeaders } from '@/lib/utils/next-cors'; import { checkoutFetcher } from '@/renderer-engine/services/fetchers/checkout-fetcher'; import { NextRequest, NextResponse } from 'next/server'; diff --git a/app/api/stores/[storeId]/checkout/direct/route.ts b/app/api/stores/[storeId]/checkout/direct/route.ts index 78f77b0f..5e65a30a 100644 --- a/app/api/stores/[storeId]/checkout/direct/route.ts +++ b/app/api/stores/[storeId]/checkout/direct/route.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { getNextCorsHeaders } from '@/lib/utils/next-cors'; import { cartFetcher } from '@/renderer-engine/services/fetchers/cart-fetcher'; import { checkoutFetcher } from '@/renderer-engine/services/fetchers/checkout-fetcher'; diff --git a/app/api/stores/[storeId]/checkout/start/route.ts b/app/api/stores/[storeId]/checkout/start/route.ts index e6830e17..c4f7bbb1 100644 --- a/app/api/stores/[storeId]/checkout/start/route.ts +++ b/app/api/stores/[storeId]/checkout/start/route.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { getNextCorsHeaders } from '@/lib/utils/next-cors'; import { cartFetcher } from '@/renderer-engine/services/fetchers/cart-fetcher'; import { checkoutFetcher } from '@/renderer-engine/services/fetchers/checkout-fetcher'; diff --git a/app/api/stores/[storeId]/custom-domain/route.ts b/app/api/stores/[storeId]/custom-domain/route.ts index e262d5df..5e776ee8 100644 --- a/app/api/stores/[storeId]/custom-domain/route.ts +++ b/app/api/stores/[storeId]/custom-domain/route.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { getNextCorsHeaders } from '@/lib/utils/next-cors'; import { logger } from '@/renderer-engine/lib/logger'; import { CustomDomainService } from '@/tenant-domains/services/custom-domain-service'; diff --git a/app/api/stores/[storeId]/products/filter/route.ts b/app/api/stores/[storeId]/products/filter/route.ts index f427fcef..dc85d726 100644 --- a/app/api/stores/[storeId]/products/filter/route.ts +++ b/app/api/stores/[storeId]/products/filter/route.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { getNextCorsHeaders } from '@/lib/utils/next-cors'; import { logger } from '@/renderer-engine/lib/logger'; import { dataTransformer } from '@/renderer-engine/services/core/data-transformer'; diff --git a/app/api/stores/[storeId]/search/route.ts b/app/api/stores/[storeId]/search/route.ts index 5c8ec7bb..eda7080f 100644 --- a/app/api/stores/[storeId]/search/route.ts +++ b/app/api/stores/[storeId]/search/route.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { getNextCorsHeaders } from '@/lib/utils/next-cors'; import { cacheManager, getSearchProductsCacheKey } from '@/renderer-engine/services/core/cache'; import { dataTransformer } from '@/renderer-engine/services/core/data-transformer'; diff --git a/app/api/stores/[storeId]/themes/confirm/route.ts b/app/api/stores/[storeId]/themes/confirm/route.ts index 99b263f7..edbe076d 100644 --- a/app/api/stores/[storeId]/themes/confirm/route.ts +++ b/app/api/stores/[storeId]/themes/confirm/route.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { getNextCorsHeaders } from '@/lib/utils/next-cors'; import { logger } from '@/renderer-engine/lib/logger'; import { diff --git a/app/api/stores/[storeId]/themes/route.ts b/app/api/stores/[storeId]/themes/route.ts index 8410117b..a10e5325 100644 --- a/app/api/stores/[storeId]/themes/route.ts +++ b/app/api/stores/[storeId]/themes/route.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { getNextCorsHeaders } from '@/lib/utils/next-cors'; import { logger } from '@/renderer-engine/lib/logger'; import { AuthGetCurrentUserServer, cookiesClient } from '@/utils/client/AmplifyUtils'; diff --git a/app/api/stores/[storeId]/themes/upload/route.ts b/app/api/stores/[storeId]/themes/upload/route.ts index 4d9dd62f..95834790 100644 --- a/app/api/stores/[storeId]/themes/upload/route.ts +++ b/app/api/stores/[storeId]/themes/upload/route.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { getNextCorsHeaders } from '@/lib/utils/next-cors'; import { logger } from '@/renderer-engine/lib/logger'; import { TemplateAnalysis } from '@/renderer-engine/services/templates/analysis/template-analyzer'; diff --git a/app/api/stores/template-dev/route.ts b/app/api/stores/template-dev/route.ts index 6c463de9..d316976e 100644 --- a/app/api/stores/template-dev/route.ts +++ b/app/api/stores/template-dev/route.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { getNextCorsHeaders } from '@/lib/utils/next-cors'; import { logger } from '@/renderer-engine/lib/logger'; import { templateDevSynchronizer } from '@/renderer-engine/services/templates/sync/template-dev-synchronizer'; diff --git a/app/api/stores/template-dev/ws/route.ts b/app/api/stores/template-dev/ws/route.ts index 8f47d86e..d3d6b148 100644 --- a/app/api/stores/template-dev/ws/route.ts +++ b/app/api/stores/template-dev/ws/route.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { logger } from '@/renderer-engine/lib/logger'; import { templateDevSynchronizer } from '@/renderer-engine/services/templates/sync/template-dev-synchronizer'; import { NextRequest } from 'next/server'; diff --git a/app/api/stores/template/route.ts b/app/api/stores/template/route.ts index 2f2976c7..ecb99bd4 100644 --- a/app/api/stores/template/route.ts +++ b/app/api/stores/template/route.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { getNextCorsHeaders } from '@/lib/utils/next-cors' import { SchemaParser } from '@/renderer-engine/services/templates/parsing/schema-parser' import { ThemeValidator } from '@/renderer-engine/services/themes' diff --git a/lib/cookies/cookiesOption.ts b/lib/cookies/cookiesOption.ts index a7e42f9c..d967b68a 100644 --- a/lib/cookies/cookiesOption.ts +++ b/lib/cookies/cookiesOption.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + export const getCookieOptions = () => { const isProduction = process.env.APP_ENV === 'production'; diff --git a/lib/utils.ts b/lib/utils.ts index 2819a830..1be5da51 100644 --- a/lib/utils.ts +++ b/lib/utils.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { clsx, type ClassValue } from 'clsx'; import { twMerge } from 'tailwind-merge'; diff --git a/lib/utils/next-cors.ts b/lib/utils/next-cors.ts index d88b52e4..5482b792 100644 --- a/lib/utils/next-cors.ts +++ b/lib/utils/next-cors.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { logger } from '@/renderer-engine/lib/logger'; import { domainResolver } from '@/renderer-engine/services/core/domain-resolver'; import { NextRequest } from 'next/server'; diff --git a/lib/utils/secure-logger.ts b/lib/utils/secure-logger.ts index 485957b2..6276945f 100644 --- a/lib/utils/secure-logger.ts +++ b/lib/utils/secure-logger.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + /** * Utilidad de logging segura que previene vulnerabilidades de cadenas de formato * y sanitiza datos de entrada del usuario diff --git a/lib/zod-schemas/api-keys.ts b/lib/zod-schemas/api-keys.ts index cdccc613..5d4dc742 100644 --- a/lib/zod-schemas/api-keys.ts +++ b/lib/zod-schemas/api-keys.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { z } from 'zod'; export const PAYMENT_GATEWAYS = { diff --git a/lib/zod-schemas/email-change.ts b/lib/zod-schemas/email-change.ts index cb026afc..38f22db4 100644 --- a/lib/zod-schemas/email-change.ts +++ b/lib/zod-schemas/email-change.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import * as z from 'zod'; export const emailSchema = z.object({ diff --git a/lib/zod-schemas/first-step.ts b/lib/zod-schemas/first-step.ts index 6e85de07..08a99255 100644 --- a/lib/zod-schemas/first-step.ts +++ b/lib/zod-schemas/first-step.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import * as z from 'zod'; export const personalInfoSchema = z.object({ diff --git a/lib/zod-schemas/navigation.ts b/lib/zod-schemas/navigation.ts index c6587ec1..ce0df351 100644 --- a/lib/zod-schemas/navigation.ts +++ b/lib/zod-schemas/navigation.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { z } from 'zod'; /** diff --git a/lib/zod-schemas/page.ts b/lib/zod-schemas/page.ts index dfa3bb5a..8c6a67aa 100644 --- a/lib/zod-schemas/page.ts +++ b/lib/zod-schemas/page.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { z } from 'zod'; // Esquema para la creación de una página diff --git a/lib/zod-schemas/password-change.ts b/lib/zod-schemas/password-change.ts index bf6c0a47..0f13105e 100644 --- a/lib/zod-schemas/password-change.ts +++ b/lib/zod-schemas/password-change.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import * as z from 'zod'; export const passwordSchema = z diff --git a/lib/zod-schemas/product-schema.ts b/lib/zod-schemas/product-schema.ts index edcc7f00..8343ccc5 100644 --- a/lib/zod-schemas/product-schema.ts +++ b/lib/zod-schemas/product-schema.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import * as z from 'zod'; export const productFormSchema = z.object({ diff --git a/lib/zod-schemas/schemas.ts b/lib/zod-schemas/schemas.ts index 5131c6ea..2472e728 100644 --- a/lib/zod-schemas/schemas.ts +++ b/lib/zod-schemas/schemas.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import * as z from 'zod'; export const signInSchema = z.object({ diff --git a/lib/zod-schemas/store-profile-schema.ts b/lib/zod-schemas/store-profile-schema.ts index c496c732..f4749fe6 100644 --- a/lib/zod-schemas/store-profile-schema.ts +++ b/lib/zod-schemas/store-profile-schema.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import * as z from 'zod'; export const storeProfileSchema = z.object({ diff --git a/middlewares/auth/auth.ts b/middlewares/auth/auth.ts index 742e9b33..1b560530 100644 --- a/middlewares/auth/auth.ts +++ b/middlewares/auth/auth.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { runWithAmplifyServerContext } from '@/utils/client/AmplifyUtils'; import { fetchAuthSession } from 'aws-amplify/auth/server'; import { NextRequest, NextResponse } from 'next/server'; diff --git a/middlewares/domain-handling/domainHandler.ts b/middlewares/domain-handling/domainHandler.ts index 1abf0d43..6cd8d96e 100644 --- a/middlewares/domain-handling/domainHandler.ts +++ b/middlewares/domain-handling/domainHandler.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { NextRequest, NextResponse } from 'next/server'; export interface DomainConfig { diff --git a/middlewares/ownership/collectionOwnership.ts b/middlewares/ownership/collectionOwnership.ts index cce3de58..ee170cf2 100644 --- a/middlewares/ownership/collectionOwnership.ts +++ b/middlewares/ownership/collectionOwnership.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { getSession } from '@/middlewares/auth/auth'; import { cookiesClient } from '@/utils/client/AmplifyUtils'; import { NextRequest, NextResponse } from 'next/server'; diff --git a/middlewares/ownership/pagesOwnership.ts b/middlewares/ownership/pagesOwnership.ts index 3d505dc0..f112a58c 100644 --- a/middlewares/ownership/pagesOwnership.ts +++ b/middlewares/ownership/pagesOwnership.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { getSession } from '@/middlewares/auth/auth'; import { cookiesClient } from '@/utils/client/AmplifyUtils'; import { NextRequest, NextResponse } from 'next/server'; diff --git a/middlewares/ownership/productOwnership.ts b/middlewares/ownership/productOwnership.ts index 907ffd6a..bf6883a5 100644 --- a/middlewares/ownership/productOwnership.ts +++ b/middlewares/ownership/productOwnership.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { getSession } from '@/middlewares/auth/auth'; import { cookiesClient } from '@/utils/client/AmplifyUtils'; import { NextRequest, NextResponse } from 'next/server'; diff --git a/middlewares/store-access/store.ts b/middlewares/store-access/store.ts index 30b299fd..c3c1aca3 100644 --- a/middlewares/store-access/store.ts +++ b/middlewares/store-access/store.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { getSession } from '@/middlewares/auth/auth'; import { cookiesClient } from '@/utils/client/AmplifyUtils'; import { NextRequest, NextResponse } from 'next/server'; diff --git a/middlewares/store-access/storeAccess.ts b/middlewares/store-access/storeAccess.ts index e6cba26f..58dab53f 100644 --- a/middlewares/store-access/storeAccess.ts +++ b/middlewares/store-access/storeAccess.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { getSession } from '@/middlewares/auth/auth'; import { cookiesClient } from '@/utils/client/AmplifyUtils'; import { NextRequest, NextResponse } from 'next/server'; diff --git a/middlewares/subscription/subscription.ts b/middlewares/subscription/subscription.ts index 5e171ef5..e1ec7f57 100644 --- a/middlewares/subscription/subscription.ts +++ b/middlewares/subscription/subscription.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { NextRequest, NextResponse } from 'next/server'; import { getSession } from '@/middlewares/auth/auth'; diff --git a/package-lock.json b/package-lock.json index 39feee58..1c2dad17 100644 --- a/package-lock.json +++ b/package-lock.json @@ -90,6 +90,7 @@ "constructs": "^10.4.2", "esbuild": "^0.25.6", "git-format-staged": "^3.1.1", + "glob": "^11.0.3", "husky": "^9.1.7", "identity-obj-proxy": "^3.0.0", "jest": "^30.0.4", diff --git a/package.json b/package.json index 153918ee..198c4c74 100644 --- a/package.json +++ b/package.json @@ -101,6 +101,7 @@ "constructs": "^10.4.2", "esbuild": "^0.25.6", "git-format-staged": "^3.1.1", + "glob": "^11.0.3", "husky": "^9.1.7", "identity-obj-proxy": "^3.0.0", "jest": "^30.0.4", diff --git a/renderer-engine/config/page-config.ts b/renderer-engine/config/page-config.ts index 3585a314..2548bfbb 100644 --- a/renderer-engine/config/page-config.ts +++ b/renderer-engine/config/page-config.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { cacheManager } from '@/renderer-engine/services/core/cache'; import type { PageType } from '@/renderer-engine/types/template'; diff --git a/renderer-engine/config/route-matchers.ts b/renderer-engine/config/route-matchers.ts index 1834c210..0aedf39c 100644 --- a/renderer-engine/config/route-matchers.ts +++ b/renderer-engine/config/route-matchers.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import type { PageRenderOptions } from '@/renderer-engine/types/template'; /** diff --git a/renderer-engine/exports.ts b/renderer-engine/exports.ts index c6d9ecd7..ae4f78d4 100644 --- a/renderer-engine/exports.ts +++ b/renderer-engine/exports.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + // ===== FACTORY PRINCIPAL ===== export { StoreRendererFactory } from '@/renderer-engine/factories/store-renderer-factory'; export { storeRenderer } from '@/renderer-engine/instances'; diff --git a/renderer-engine/factories/store-renderer-factory.ts b/renderer-engine/factories/store-renderer-factory.ts index e3f90425..b643a88c 100644 --- a/renderer-engine/factories/store-renderer-factory.ts +++ b/renderer-engine/factories/store-renderer-factory.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { pathToRenderOptions } from '@/renderer-engine/config/route-matchers'; import { logger } from '@/renderer-engine/lib/logger'; import { DynamicPageRenderer } from '@/renderer-engine/renderers/dynamic-page-renderer'; diff --git a/renderer-engine/index.ts b/renderer-engine/index.ts index 3d180dca..dc73d323 100644 --- a/renderer-engine/index.ts +++ b/renderer-engine/index.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + /** * Renderer Engine - Sistema de renderizado de tiendas * diff --git a/renderer-engine/instances.ts b/renderer-engine/instances.ts index d12df5cb..6b8f0117 100644 --- a/renderer-engine/instances.ts +++ b/renderer-engine/instances.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { StoreRendererFactory } from '@/renderer-engine/factories/store-renderer-factory'; /** diff --git a/renderer-engine/lib/inject-assets.ts b/renderer-engine/lib/inject-assets.ts index 0c1c294b..199bef00 100644 --- a/renderer-engine/lib/inject-assets.ts +++ b/renderer-engine/lib/inject-assets.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + /** * Utilidad para inyectar CSS y JS en el HTML renderizado * @param html - El HTML a inyectar los assets diff --git a/renderer-engine/lib/logger.ts b/renderer-engine/lib/logger.ts index 197c29b8..c4344065 100644 --- a/renderer-engine/lib/logger.ts +++ b/renderer-engine/lib/logger.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { SecureLogger } from '@/lib/utils/secure-logger'; /** diff --git a/renderer-engine/liquid/engine.ts b/renderer-engine/liquid/engine.ts index d7e7817e..10cc1b8e 100644 --- a/renderer-engine/liquid/engine.ts +++ b/renderer-engine/liquid/engine.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { allFilters } from '@/renderer-engine/liquid/filters'; import { FiltersTag, diff --git a/renderer-engine/liquid/filters.ts b/renderer-engine/liquid/filters.ts index 2427168c..0877e34f 100644 --- a/renderer-engine/liquid/filters.ts +++ b/renderer-engine/liquid/filters.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + // Re-exportar todos los filtros desde sus módulos específicos export { baseFilters } from './filters/base-filters'; export { cartFilters } from './filters/cart-filters'; diff --git a/renderer-engine/liquid/filters/base-filters.ts b/renderer-engine/liquid/filters/base-filters.ts index 37d7b62b..abce3cfd 100644 --- a/renderer-engine/liquid/filters/base-filters.ts +++ b/renderer-engine/liquid/filters/base-filters.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import type { LiquidFilter } from '@/renderer-engine/types'; /** diff --git a/renderer-engine/liquid/filters/cart-filters.ts b/renderer-engine/liquid/filters/cart-filters.ts index 749bfa14..0e4aaa82 100644 --- a/renderer-engine/liquid/filters/cart-filters.ts +++ b/renderer-engine/liquid/filters/cart-filters.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import type { LiquidFilter } from '@/renderer-engine/types'; /** diff --git a/renderer-engine/liquid/filters/data-access-filters.ts b/renderer-engine/liquid/filters/data-access-filters.ts index 52d8f353..955d2659 100644 --- a/renderer-engine/liquid/filters/data-access-filters.ts +++ b/renderer-engine/liquid/filters/data-access-filters.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import type { LiquidFilter } from '@/renderer-engine/types'; /** diff --git a/renderer-engine/liquid/filters/ecommerce-filters.ts b/renderer-engine/liquid/filters/ecommerce-filters.ts index 6d73ac26..09afc88d 100644 --- a/renderer-engine/liquid/filters/ecommerce-filters.ts +++ b/renderer-engine/liquid/filters/ecommerce-filters.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import type { LiquidFilter } from '@/renderer-engine/types'; /** diff --git a/renderer-engine/liquid/filters/html-filters.ts b/renderer-engine/liquid/filters/html-filters.ts index e677377d..d0e8e0b4 100644 --- a/renderer-engine/liquid/filters/html-filters.ts +++ b/renderer-engine/liquid/filters/html-filters.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { logger } from '@/renderer-engine/lib/logger'; import type { LiquidFilter } from '@/renderer-engine/types'; diff --git a/renderer-engine/liquid/filters/money-filters.ts b/renderer-engine/liquid/filters/money-filters.ts index 3fb0e61e..b921e334 100644 --- a/renderer-engine/liquid/filters/money-filters.ts +++ b/renderer-engine/liquid/filters/money-filters.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import type { LiquidFilter } from '@/renderer-engine/types'; /** diff --git a/renderer-engine/liquid/index.ts b/renderer-engine/liquid/index.ts index 6e2133be..9dbee2e4 100644 --- a/renderer-engine/liquid/index.ts +++ b/renderer-engine/liquid/index.ts @@ -1 +1,17 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + export * from './tags'; diff --git a/renderer-engine/liquid/tags/core/index.ts b/renderer-engine/liquid/tags/core/index.ts index 8c417751..199a2987 100644 --- a/renderer-engine/liquid/tags/core/index.ts +++ b/renderer-engine/liquid/tags/core/index.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + export { PaginateTag } from './paginate-tag'; export { IncludeTag, RenderTag } from './render-tag'; export { SectionTag } from './section-tag'; diff --git a/renderer-engine/liquid/tags/core/paginate-tag.ts b/renderer-engine/liquid/tags/core/paginate-tag.ts index 6cafbb51..dd42771e 100644 --- a/renderer-engine/liquid/tags/core/paginate-tag.ts +++ b/renderer-engine/liquid/tags/core/paginate-tag.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { logger } from '@/renderer-engine/lib/logger'; import { Context, Emitter, Liquid, Tag, TagToken, Template, TopLevelToken } from 'liquidjs'; diff --git a/renderer-engine/liquid/tags/core/render-tag.ts b/renderer-engine/liquid/tags/core/render-tag.ts index 42abbccc..1449c606 100644 --- a/renderer-engine/liquid/tags/core/render-tag.ts +++ b/renderer-engine/liquid/tags/core/render-tag.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { Tag, TagToken, Context, TopLevelToken, Liquid } from 'liquidjs'; import { logger } from '@/renderer-engine/lib/logger'; diff --git a/renderer-engine/liquid/tags/core/section-tag.ts b/renderer-engine/liquid/tags/core/section-tag.ts index 40abd935..d65af057 100644 --- a/renderer-engine/liquid/tags/core/section-tag.ts +++ b/renderer-engine/liquid/tags/core/section-tag.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { Tag, TagToken, Context, TopLevelToken, Liquid } from 'liquidjs'; import { logger } from '@/renderer-engine/lib/logger'; diff --git a/renderer-engine/liquid/tags/data/index.ts b/renderer-engine/liquid/tags/data/index.ts index 2c91f36f..ff735115 100644 --- a/renderer-engine/liquid/tags/data/index.ts +++ b/renderer-engine/liquid/tags/data/index.ts @@ -1,2 +1,18 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + export { JavaScriptTag, LiquidScriptFilter, SectionScriptHelper } from './javascript-tag'; export { SchemaTag } from './schema-tag'; diff --git a/renderer-engine/liquid/tags/data/javascript-tag.ts b/renderer-engine/liquid/tags/data/javascript-tag.ts index f6a2a0b6..9bd2e789 100644 --- a/renderer-engine/liquid/tags/data/javascript-tag.ts +++ b/renderer-engine/liquid/tags/data/javascript-tag.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { Tag, TagToken, Context, TopLevelToken, Liquid, TokenKind } from 'liquidjs'; import { AssetCollector } from '@/renderer-engine/services/rendering/asset-collector'; import { logger } from '@/renderer-engine/lib/logger'; diff --git a/renderer-engine/liquid/tags/data/schema-tag.ts b/renderer-engine/liquid/tags/data/schema-tag.ts index 3ce5c3e6..9461b3aa 100644 --- a/renderer-engine/liquid/tags/data/schema-tag.ts +++ b/renderer-engine/liquid/tags/data/schema-tag.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { Tag, TagToken, Context, TopLevelToken, Liquid, TokenKind } from 'liquidjs'; import { logger } from '@/renderer-engine/lib/logger'; diff --git a/renderer-engine/liquid/tags/filters/data-fetcher.ts b/renderer-engine/liquid/tags/filters/data-fetcher.ts index 84481684..b14eb2e6 100644 --- a/renderer-engine/liquid/tags/filters/data-fetcher.ts +++ b/renderer-engine/liquid/tags/filters/data-fetcher.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { dataFetcher } from '@/renderer-engine/services/fetchers/data-fetcher'; import { AvailableFilters } from './types'; diff --git a/renderer-engine/liquid/tags/filters/filters-tag.ts b/renderer-engine/liquid/tags/filters/filters-tag.ts index b4fe67bc..98d7554d 100644 --- a/renderer-engine/liquid/tags/filters/filters-tag.ts +++ b/renderer-engine/liquid/tags/filters/filters-tag.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { Context, Emitter, Tag } from 'liquidjs'; import { FilterConfig, FilterSystem } from './index'; diff --git a/renderer-engine/liquid/tags/filters/html-generator.ts b/renderer-engine/liquid/tags/filters/html-generator.ts index e33dee99..6b596a0f 100644 --- a/renderer-engine/liquid/tags/filters/html-generator.ts +++ b/renderer-engine/liquid/tags/filters/html-generator.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { AvailableFilters, FilterConfig } from './types'; export class FilterHtmlGenerator { diff --git a/renderer-engine/liquid/tags/filters/index.ts b/renderer-engine/liquid/tags/filters/index.ts index 55545990..786f375a 100644 --- a/renderer-engine/liquid/tags/filters/index.ts +++ b/renderer-engine/liquid/tags/filters/index.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { FilterDataFetcher } from './data-fetcher'; import { FilterHtmlGenerator } from './html-generator'; import { FilterJavaScriptGenerator } from './javascript-generator'; diff --git a/renderer-engine/liquid/tags/filters/javascript-generator.ts b/renderer-engine/liquid/tags/filters/javascript-generator.ts index da5d2c7e..5d4e405c 100644 --- a/renderer-engine/liquid/tags/filters/javascript-generator.ts +++ b/renderer-engine/liquid/tags/filters/javascript-generator.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { FilterConfig } from './types'; export class FilterJavaScriptGenerator { diff --git a/renderer-engine/liquid/tags/filters/js/dom-manager.js b/renderer-engine/liquid/tags/filters/js/dom-manager.js index f630fb0a..7f37f978 100644 --- a/renderer-engine/liquid/tags/filters/js/dom-manager.js +++ b/renderer-engine/liquid/tags/filters/js/dom-manager.js @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + /** * Gestor de elementos del DOM para el sistema de filtros */ diff --git a/renderer-engine/liquid/tags/filters/js/event-handler.js b/renderer-engine/liquid/tags/filters/js/event-handler.js index 823b1d81..d064a1d3 100644 --- a/renderer-engine/liquid/tags/filters/js/event-handler.js +++ b/renderer-engine/liquid/tags/filters/js/event-handler.js @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + /** * Manejador de eventos para el sistema de filtros */ diff --git a/renderer-engine/liquid/tags/filters/js/filter-api.js b/renderer-engine/liquid/tags/filters/js/filter-api.js index a34241af..b4ff2205 100644 --- a/renderer-engine/liquid/tags/filters/js/filter-api.js +++ b/renderer-engine/liquid/tags/filters/js/filter-api.js @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + /** * Gestor de API para el sistema de filtros */ diff --git a/renderer-engine/liquid/tags/filters/js/filter-config.js b/renderer-engine/liquid/tags/filters/js/filter-config.js index 9528193f..2cb39b44 100644 --- a/renderer-engine/liquid/tags/filters/js/filter-config.js +++ b/renderer-engine/liquid/tags/filters/js/filter-config.js @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + /** * Configuración por defecto para el sistema de filtros */ diff --git a/renderer-engine/liquid/tags/filters/js/filter-main.js b/renderer-engine/liquid/tags/filters/js/filter-main.js index 0b0abe86..3a354a66 100644 --- a/renderer-engine/liquid/tags/filters/js/filter-main.js +++ b/renderer-engine/liquid/tags/filters/js/filter-main.js @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + /** * Sistema principal de filtros */ diff --git a/renderer-engine/liquid/tags/filters/js/filter-state.js b/renderer-engine/liquid/tags/filters/js/filter-state.js index 4c08f125..b846ccdf 100644 --- a/renderer-engine/liquid/tags/filters/js/filter-state.js +++ b/renderer-engine/liquid/tags/filters/js/filter-state.js @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { INITIAL_FILTER_STATE } from 'https://cdn.fasttify.com/assets/filter-config.js'; /** diff --git a/renderer-engine/liquid/tags/filters/js/price-slider.js b/renderer-engine/liquid/tags/filters/js/price-slider.js index 0857821d..7a55d270 100644 --- a/renderer-engine/liquid/tags/filters/js/price-slider.js +++ b/renderer-engine/liquid/tags/filters/js/price-slider.js @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + /** * Manejador del slider de precios con formateo de moneda */ diff --git a/renderer-engine/liquid/tags/filters/js/product-renderer.js b/renderer-engine/liquid/tags/filters/js/product-renderer.js index 0955cf2a..098cec75 100644 --- a/renderer-engine/liquid/tags/filters/js/product-renderer.js +++ b/renderer-engine/liquid/tags/filters/js/product-renderer.js @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + /** * Renderizador de productos para el sistema de filtros * Usa el template existente de la tienda para mantener la personalización diff --git a/renderer-engine/liquid/tags/filters/js/template-manager.js b/renderer-engine/liquid/tags/filters/js/template-manager.js index 65f3e78b..a11df774 100644 --- a/renderer-engine/liquid/tags/filters/js/template-manager.js +++ b/renderer-engine/liquid/tags/filters/js/template-manager.js @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + /** * Gestor de templates personalizados para el sistema de filtros * Permite a cada tienda definir su propio diseño de productos diff --git a/renderer-engine/liquid/tags/filters/js/url-loader.js b/renderer-engine/liquid/tags/filters/js/url-loader.js index f3a6cf58..e91deb01 100644 --- a/renderer-engine/liquid/tags/filters/js/url-loader.js +++ b/renderer-engine/liquid/tags/filters/js/url-loader.js @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + /** * Cargador de filtros desde la URL */ diff --git a/renderer-engine/liquid/tags/filters/js/utils.js b/renderer-engine/liquid/tags/filters/js/utils.js index 02f107a3..c3657ccc 100644 --- a/renderer-engine/liquid/tags/filters/js/utils.js +++ b/renderer-engine/liquid/tags/filters/js/utils.js @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + /** * Utilidades para el sistema de filtros */ diff --git a/renderer-engine/liquid/tags/filters/options-parser.ts b/renderer-engine/liquid/tags/filters/options-parser.ts index 66891c53..8bb9c748 100644 --- a/renderer-engine/liquid/tags/filters/options-parser.ts +++ b/renderer-engine/liquid/tags/filters/options-parser.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { FilterConfig } from './types'; export class FilterOptionsParser { diff --git a/renderer-engine/liquid/tags/filters/types.ts b/renderer-engine/liquid/tags/filters/types.ts index 028134c0..a470776d 100644 --- a/renderer-engine/liquid/tags/filters/types.ts +++ b/renderer-engine/liquid/tags/filters/types.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + /** * Tipos para el sistema de filtros modular */ diff --git a/renderer-engine/liquid/tags/forms/form-tag.ts b/renderer-engine/liquid/tags/forms/form-tag.ts index 945c0551..c1703add 100644 --- a/renderer-engine/liquid/tags/forms/form-tag.ts +++ b/renderer-engine/liquid/tags/forms/form-tag.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { TagToken, Context, Emitter, Tag, TopLevelToken, TokenKind, Liquid } from 'liquidjs'; /** diff --git a/renderer-engine/liquid/tags/forms/index.ts b/renderer-engine/liquid/tags/forms/index.ts index dba33243..dea6fabb 100644 --- a/renderer-engine/liquid/tags/forms/index.ts +++ b/renderer-engine/liquid/tags/forms/index.ts @@ -1 +1,17 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + export { FormTag } from './form-tag'; diff --git a/renderer-engine/liquid/tags/index.ts b/renderer-engine/liquid/tags/index.ts index e204b47a..2efcd75c 100644 --- a/renderer-engine/liquid/tags/index.ts +++ b/renderer-engine/liquid/tags/index.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + export * from './core'; export * from './data'; export * from './filters'; diff --git a/renderer-engine/liquid/tags/styling/index.ts b/renderer-engine/liquid/tags/styling/index.ts index 5c3c0568..52d5c43e 100644 --- a/renderer-engine/liquid/tags/styling/index.ts +++ b/renderer-engine/liquid/tags/styling/index.ts @@ -1,2 +1,18 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + export { ScriptTag } from './script-tag'; export { StyleTag, StylesheetTag } from './style-tag'; diff --git a/renderer-engine/liquid/tags/styling/script-tag.ts b/renderer-engine/liquid/tags/styling/script-tag.ts index d762081c..282fbb14 100644 --- a/renderer-engine/liquid/tags/styling/script-tag.ts +++ b/renderer-engine/liquid/tags/styling/script-tag.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { Tag, TagToken, Context, TopLevelToken, Liquid, TokenKind } from 'liquidjs'; /** diff --git a/renderer-engine/liquid/tags/styling/style-tag.ts b/renderer-engine/liquid/tags/styling/style-tag.ts index 7fe66812..ca664e20 100644 --- a/renderer-engine/liquid/tags/styling/style-tag.ts +++ b/renderer-engine/liquid/tags/styling/style-tag.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { Tag, TagToken, Context, TopLevelToken, Liquid, TokenKind } from 'liquidjs'; import { AssetCollector } from '@/renderer-engine/services/rendering/asset-collector'; import { logger } from '@/renderer-engine/lib/logger'; diff --git a/renderer-engine/renderers/dynamic-page-renderer.ts b/renderer-engine/renderers/dynamic-page-renderer.ts index 6c8d7b58..b5998e78 100644 --- a/renderer-engine/renderers/dynamic-page-renderer.ts +++ b/renderer-engine/renderers/dynamic-page-renderer.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + // Core utilities import { injectAssets } from '@/renderer-engine/lib/inject-assets'; import { logger } from '@/renderer-engine/lib/logger'; diff --git a/renderer-engine/renderers/pipeline-steps/build-context-step.ts b/renderer-engine/renderers/pipeline-steps/build-context-step.ts index 07bcb481..c3006023 100644 --- a/renderer-engine/renderers/pipeline-steps/build-context-step.ts +++ b/renderer-engine/renderers/pipeline-steps/build-context-step.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import type { RenderingData } from '@/renderer-engine/renderers/dynamic-page-renderer'; import { contextBuilder } from '@/renderer-engine/services/rendering/global-context'; diff --git a/renderer-engine/renderers/pipeline-steps/index.ts b/renderer-engine/renderers/pipeline-steps/index.ts index 7185e22c..6e7434ef 100644 --- a/renderer-engine/renderers/pipeline-steps/index.ts +++ b/renderer-engine/renderers/pipeline-steps/index.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + export * from './build-context-step'; export * from './initialize-engine-step'; export * from './load-data-step'; diff --git a/renderer-engine/renderers/pipeline-steps/initialize-engine-step.ts b/renderer-engine/renderers/pipeline-steps/initialize-engine-step.ts index ae66a69d..33f7a5b5 100644 --- a/renderer-engine/renderers/pipeline-steps/initialize-engine-step.ts +++ b/renderer-engine/renderers/pipeline-steps/initialize-engine-step.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { liquidEngine } from '@/renderer-engine/liquid/engine'; import type { RenderingData } from '@/renderer-engine/renderers/dynamic-page-renderer'; diff --git a/renderer-engine/renderers/pipeline-steps/load-data-step.ts b/renderer-engine/renderers/pipeline-steps/load-data-step.ts index be0127bf..19548881 100644 --- a/renderer-engine/renderers/pipeline-steps/load-data-step.ts +++ b/renderer-engine/renderers/pipeline-steps/load-data-step.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { pageConfig } from '@/renderer-engine/config/page-config'; import { logger } from '@/renderer-engine/lib/logger'; import type { RenderingData } from '@/renderer-engine/renderers/dynamic-page-renderer'; diff --git a/renderer-engine/renderers/pipeline-steps/render-content-step.ts b/renderer-engine/renderers/pipeline-steps/render-content-step.ts index f6c7a893..692a3dbb 100644 --- a/renderer-engine/renderers/pipeline-steps/render-content-step.ts +++ b/renderer-engine/renderers/pipeline-steps/render-content-step.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { pageConfig } from '@/renderer-engine/config/page-config'; import type { RenderingData } from '@/renderer-engine/renderers/dynamic-page-renderer'; import { renderPageContent } from '@/renderer-engine/services/rendering/render-page-content'; diff --git a/renderer-engine/renderers/pipeline-steps/resolve-store-step.ts b/renderer-engine/renderers/pipeline-steps/resolve-store-step.ts index 38296346..89fb1c7b 100644 --- a/renderer-engine/renderers/pipeline-steps/resolve-store-step.ts +++ b/renderer-engine/renderers/pipeline-steps/resolve-store-step.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import type { RenderingData } from '@/renderer-engine/renderers/dynamic-page-renderer'; import { domainResolver } from '@/renderer-engine/services/core/domain-resolver'; diff --git a/renderer-engine/services/core/cache/cache-invalidation-service.ts b/renderer-engine/services/core/cache/cache-invalidation-service.ts index af7795ea..a0f3a8ad 100644 --- a/renderer-engine/services/core/cache/cache-invalidation-service.ts +++ b/renderer-engine/services/core/cache/cache-invalidation-service.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { logger } from '@/renderer-engine/lib/logger'; import { cacheManager, diff --git a/renderer-engine/services/core/cache/cache-keys.ts b/renderer-engine/services/core/cache/cache-keys.ts index b90d3792..c5028bcd 100644 --- a/renderer-engine/services/core/cache/cache-keys.ts +++ b/renderer-engine/services/core/cache/cache-keys.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + // Utilidad centralizada para generación de claves de caché // Usar siempre estas funciones para set/get/invalidate caché diff --git a/renderer-engine/services/core/cache/cache-manager.ts b/renderer-engine/services/core/cache/cache-manager.ts index 3aebd6fe..f40198e0 100644 --- a/renderer-engine/services/core/cache/cache-manager.ts +++ b/renderer-engine/services/core/cache/cache-manager.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { logger } from '@/renderer-engine/lib/logger'; interface DataCache { diff --git a/renderer-engine/services/core/cache/index.ts b/renderer-engine/services/core/cache/index.ts index 30a106c1..2e4a4ccb 100644 --- a/renderer-engine/services/core/cache/index.ts +++ b/renderer-engine/services/core/cache/index.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + export * from './cache-manager'; export * from './cache-invalidation-service'; export * from './cache-keys'; diff --git a/renderer-engine/services/core/data-transformer.ts b/renderer-engine/services/core/data-transformer.ts index 5ea6f94b..359b1a10 100644 --- a/renderer-engine/services/core/data-transformer.ts +++ b/renderer-engine/services/core/data-transformer.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + export class DataTransformer { /** * Crea un handle SEO-friendly a partir de un texto diff --git a/renderer-engine/services/core/domain-resolver.ts b/renderer-engine/services/core/domain-resolver.ts index 91fb6c54..f5533f37 100644 --- a/renderer-engine/services/core/domain-resolver.ts +++ b/renderer-engine/services/core/domain-resolver.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { cacheManager, getDomainCacheKey } from '@/renderer-engine/services/core/cache'; import { logger } from '@/renderer-engine/lib/logger'; import type { Store, TemplateError } from '@/renderer-engine/types'; diff --git a/renderer-engine/services/core/navigation-service.ts b/renderer-engine/services/core/navigation-service.ts index 71cc2180..149da296 100644 --- a/renderer-engine/services/core/navigation-service.ts +++ b/renderer-engine/services/core/navigation-service.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { dataFetcher } from '@/renderer-engine/services/fetchers/data-fetcher'; import type { ProcessedNavigationMenu } from '@/renderer-engine/types/store'; import { logger } from '@/renderer-engine/lib/logger'; diff --git a/renderer-engine/services/errors/error-messages.ts b/renderer-engine/services/errors/error-messages.ts index a4dc2a38..0ec4612c 100644 --- a/renderer-engine/services/errors/error-messages.ts +++ b/renderer-engine/services/errors/error-messages.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + // Helpers para mensajes, títulos, descripciones y sugerencias de errores import type { TemplateError } from '@/renderer-engine/types'; diff --git a/renderer-engine/services/errors/error-renderer.ts b/renderer-engine/services/errors/error-renderer.ts index 00755e56..fa3d74e4 100644 --- a/renderer-engine/services/errors/error-renderer.ts +++ b/renderer-engine/services/errors/error-renderer.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { logger } from '@/renderer-engine/lib/logger'; import { liquidEngine } from '@/renderer-engine/liquid/engine'; import type { RenderResult, ShopContext, TemplateError } from '@/renderer-engine/types'; diff --git a/renderer-engine/services/errors/error-templates.ts b/renderer-engine/services/errors/error-templates.ts index 5b256830..ea027790 100644 --- a/renderer-engine/services/errors/error-templates.ts +++ b/renderer-engine/services/errors/error-templates.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + // Plantillas HTML para errores del sistema de renderizado // Cada función retorna el HTML correspondiente para el error diff --git a/renderer-engine/services/errors/error-utils.ts b/renderer-engine/services/errors/error-utils.ts index 776f803f..32d5d0a1 100644 --- a/renderer-engine/services/errors/error-utils.ts +++ b/renderer-engine/services/errors/error-utils.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import type { TemplateError } from '@/renderer-engine/types'; /** diff --git a/renderer-engine/services/fetchers/cart-fetcher.ts b/renderer-engine/services/fetchers/cart-fetcher.ts index 0cc710ac..02372517 100644 --- a/renderer-engine/services/fetchers/cart-fetcher.ts +++ b/renderer-engine/services/fetchers/cart-fetcher.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { logger } from '@/renderer-engine/lib/logger'; import { dataFetcher } from '@/renderer-engine/services/fetchers/data-fetcher'; import type { Cart, CartContext, CartItem, CartRaw, CartResponse, UpdateCartRequest } from '@/renderer-engine/types'; diff --git a/renderer-engine/services/fetchers/checkout-data-transformer.ts b/renderer-engine/services/fetchers/checkout-data-transformer.ts index f76be9a2..ccd73fb9 100644 --- a/renderer-engine/services/fetchers/checkout-data-transformer.ts +++ b/renderer-engine/services/fetchers/checkout-data-transformer.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { logger } from '@/renderer-engine/lib/logger'; import type { CheckoutContext, CheckoutSession } from '@/renderer-engine/types'; diff --git a/renderer-engine/services/fetchers/checkout-fetcher.ts b/renderer-engine/services/fetchers/checkout-fetcher.ts index 4cd04f03..3eec89e5 100644 --- a/renderer-engine/services/fetchers/checkout-fetcher.ts +++ b/renderer-engine/services/fetchers/checkout-fetcher.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { logger } from '@/renderer-engine/lib/logger'; import type { Cart, diff --git a/renderer-engine/services/fetchers/collection-fetcher.ts b/renderer-engine/services/fetchers/collection-fetcher.ts index 0f7f4d28..e08bc217 100644 --- a/renderer-engine/services/fetchers/collection-fetcher.ts +++ b/renderer-engine/services/fetchers/collection-fetcher.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { logger } from '@/renderer-engine/lib/logger'; import { cacheManager, getCollectionCacheKey, getCollectionsCacheKey } from '@/renderer-engine/services/core/cache'; import { dataTransformer } from '@/renderer-engine/services/core/data-transformer'; diff --git a/renderer-engine/services/fetchers/data-fetcher.ts b/renderer-engine/services/fetchers/data-fetcher.ts index 482a1057..bd27ef07 100644 --- a/renderer-engine/services/fetchers/data-fetcher.ts +++ b/renderer-engine/services/fetchers/data-fetcher.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { cacheManager } from '@/renderer-engine/services/core/cache'; import { cartFetcher } from '@/renderer-engine/services/fetchers/cart-fetcher'; import { collectionFetcher } from '@/renderer-engine/services/fetchers/collection-fetcher'; diff --git a/renderer-engine/services/fetchers/navigation-fetcher.ts b/renderer-engine/services/fetchers/navigation-fetcher.ts index 66cf21ac..582955c2 100644 --- a/renderer-engine/services/fetchers/navigation-fetcher.ts +++ b/renderer-engine/services/fetchers/navigation-fetcher.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { logger } from '@/renderer-engine/lib/logger'; import { cacheManager, getNavigationCacheKey, getNavigationMenuCacheKey } from '@/renderer-engine/services/core/cache'; import type { diff --git a/renderer-engine/services/fetchers/page-fetcher.ts b/renderer-engine/services/fetchers/page-fetcher.ts index 86da8606..7c77d481 100644 --- a/renderer-engine/services/fetchers/page-fetcher.ts +++ b/renderer-engine/services/fetchers/page-fetcher.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { logger } from '@/renderer-engine/lib/logger'; import { cacheManager, getPagesCacheKey, getPageCacheKey } from '@/renderer-engine/services/core/cache'; import { dataTransformer } from '@/renderer-engine/services/core/data-transformer'; diff --git a/renderer-engine/services/fetchers/product-fetcher.ts b/renderer-engine/services/fetchers/product-fetcher.ts index bc065bfd..116ace05 100644 --- a/renderer-engine/services/fetchers/product-fetcher.ts +++ b/renderer-engine/services/fetchers/product-fetcher.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { logger } from '@/renderer-engine/lib/logger'; import { cacheManager, diff --git a/renderer-engine/services/page/data-loader/core/context-builder-helper.ts b/renderer-engine/services/page/data-loader/core/context-builder-helper.ts index d2350feb..17409f48 100644 --- a/renderer-engine/services/page/data-loader/core/context-builder-helper.ts +++ b/renderer-engine/services/page/data-loader/core/context-builder-helper.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import type { PageRenderOptions } from '@/renderer-engine/types/template'; /** diff --git a/renderer-engine/services/page/data-loader/core/core-data-loader.ts b/renderer-engine/services/page/data-loader/core/core-data-loader.ts index ecfd8153..7e7bc122 100644 --- a/renderer-engine/services/page/data-loader/core/core-data-loader.ts +++ b/renderer-engine/services/page/data-loader/core/core-data-loader.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { logger } from '@/renderer-engine/lib/logger'; import { loadDataFromAnalysis } from '@/renderer-engine/services/page/data-loader'; import { buildContextData } from '@/renderer-engine/services/page/data-loader/core/context-builder-helper'; diff --git a/renderer-engine/services/page/data-loader/core/template-analyzer-helper.ts b/renderer-engine/services/page/data-loader/core/template-analyzer-helper.ts index 41e61ff9..c18526a5 100644 --- a/renderer-engine/services/page/data-loader/core/template-analyzer-helper.ts +++ b/renderer-engine/services/page/data-loader/core/template-analyzer-helper.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { logger } from '@/renderer-engine/lib/logger'; import { extractPaginationLimitFromTemplate } from '@/renderer-engine/services/page/data-loader/pagination/pagination-limit-extractor'; import type { TemplateAnalysis } from '@/renderer-engine/services/templates/analysis/template-analyzer'; diff --git a/renderer-engine/services/page/data-loader/data-fetcher-helper.ts b/renderer-engine/services/page/data-loader/data-fetcher-helper.ts index 0031f934..8709ce77 100644 --- a/renderer-engine/services/page/data-loader/data-fetcher-helper.ts +++ b/renderer-engine/services/page/data-loader/data-fetcher-helper.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { logger } from '@/renderer-engine/lib/logger'; import type { TemplateAnalysis } from '@/renderer-engine/services/templates/analysis/template-analyzer'; import type { PageRenderOptions, PaginationInfo } from '@/renderer-engine/types/template'; diff --git a/renderer-engine/services/page/data-loader/handlers/data-handlers.ts b/renderer-engine/services/page/data-loader/handlers/data-handlers.ts index 63fa75d0..2891b74c 100644 --- a/renderer-engine/services/page/data-loader/handlers/data-handlers.ts +++ b/renderer-engine/services/page/data-loader/handlers/data-handlers.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { logger } from '@/renderer-engine/lib/logger'; import { checkoutFetcher } from '@/renderer-engine/services/fetchers/checkout-fetcher'; import { dataFetcher } from '@/renderer-engine/services/fetchers/data-fetcher'; diff --git a/renderer-engine/services/page/data-loader/handlers/response-processors.ts b/renderer-engine/services/page/data-loader/handlers/response-processors.ts index be75dc61..f18bf20e 100644 --- a/renderer-engine/services/page/data-loader/handlers/response-processors.ts +++ b/renderer-engine/services/page/data-loader/handlers/response-processors.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import type { DataRequirement } from '@/renderer-engine/services/templates/analysis/template-analyzer'; import type { PaginationInfo } from '@/renderer-engine/types/template'; diff --git a/renderer-engine/services/page/data-loader/index.ts b/renderer-engine/services/page/data-loader/index.ts index 053b2518..0fdc31d0 100644 --- a/renderer-engine/services/page/data-loader/index.ts +++ b/renderer-engine/services/page/data-loader/index.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + // Exportaciones principales export { loadDataFromAnalysis } from './data-fetcher-helper'; diff --git a/renderer-engine/services/page/data-loader/pagination/pagination-builder-helper.ts b/renderer-engine/services/page/data-loader/pagination/pagination-builder-helper.ts index df5224bc..a55dd71e 100644 --- a/renderer-engine/services/page/data-loader/pagination/pagination-builder-helper.ts +++ b/renderer-engine/services/page/data-loader/pagination/pagination-builder-helper.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import type { TemplateAnalysis } from '@/renderer-engine/services/templates/analysis/template-analyzer'; import type { PaginationInfo } from '@/renderer-engine/types/template'; diff --git a/renderer-engine/services/page/data-loader/pagination/pagination-limit-extractor.ts b/renderer-engine/services/page/data-loader/pagination/pagination-limit-extractor.ts index 336c6b44..47bec9f4 100644 --- a/renderer-engine/services/page/data-loader/pagination/pagination-limit-extractor.ts +++ b/renderer-engine/services/page/data-loader/pagination/pagination-limit-extractor.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { logger } from '@/renderer-engine/lib/logger'; import type { DataRequirement, diff --git a/renderer-engine/services/page/data-loader/search/search-data-loader.ts b/renderer-engine/services/page/data-loader/search/search-data-loader.ts index 477db479..cc93d5a5 100644 --- a/renderer-engine/services/page/data-loader/search/search-data-loader.ts +++ b/renderer-engine/services/page/data-loader/search/search-data-loader.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { logger } from '@/renderer-engine/lib/logger'; import { dataFetcher } from '@/renderer-engine/services/fetchers/data-fetcher'; import { productFetcher } from '@/renderer-engine/services/fetchers/product-fetcher'; diff --git a/renderer-engine/services/page/data-loader/search/search-limits-extractor.ts b/renderer-engine/services/page/data-loader/search/search-limits-extractor.ts index ae64989e..940b429e 100644 --- a/renderer-engine/services/page/data-loader/search/search-limits-extractor.ts +++ b/renderer-engine/services/page/data-loader/search/search-limits-extractor.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { logger } from '@/renderer-engine/lib/logger'; /** diff --git a/renderer-engine/services/page/dynamic-data-loader.ts b/renderer-engine/services/page/dynamic-data-loader.ts index 7b16be41..cfbf2661 100644 --- a/renderer-engine/services/page/dynamic-data-loader.ts +++ b/renderer-engine/services/page/dynamic-data-loader.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { logger } from '@/renderer-engine/lib/logger'; import { coreDataLoader, searchDataLoader } from '@/renderer-engine/services/page/data-loader'; import type { CoreData } from '@/renderer-engine/services/page/data-loader/core/core-data-loader'; diff --git a/renderer-engine/services/rendering/asset-collector.ts b/renderer-engine/services/rendering/asset-collector.ts index 6282ab23..e5c438c8 100644 --- a/renderer-engine/services/rendering/asset-collector.ts +++ b/renderer-engine/services/rendering/asset-collector.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + export type Asset = { content: string; id: string; diff --git a/renderer-engine/services/rendering/global-context.ts b/renderer-engine/services/rendering/global-context.ts index 3f794885..97400a19 100644 --- a/renderer-engine/services/rendering/global-context.ts +++ b/renderer-engine/services/rendering/global-context.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { logger } from '@/renderer-engine/lib/logger'; import { flexibleLinkListService, linkListService } from '@/renderer-engine/services/core/navigation-service'; import type { CartContext, PageContext, RenderContext, ShopContext } from '@/renderer-engine/types'; diff --git a/renderer-engine/services/rendering/metadata-generator.ts b/renderer-engine/services/rendering/metadata-generator.ts index f326d5a7..108200ce 100644 --- a/renderer-engine/services/rendering/metadata-generator.ts +++ b/renderer-engine/services/rendering/metadata-generator.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import type { OpenGraphData, RenderResult, SchemaData, TwitterCardData } from '@/renderer-engine/types/template'; export class MetadataGenerator { diff --git a/renderer-engine/services/rendering/render-page-content.ts b/renderer-engine/services/rendering/render-page-content.ts index 891cdb2f..469a7329 100644 --- a/renderer-engine/services/rendering/render-page-content.ts +++ b/renderer-engine/services/rendering/render-page-content.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { logger } from '@/renderer-engine/lib/logger'; import { liquidEngine } from '@/renderer-engine/liquid/engine'; import { sectionRenderer } from '@/renderer-engine/services/rendering/section-renderer'; diff --git a/renderer-engine/services/rendering/section-renderer.ts b/renderer-engine/services/rendering/section-renderer.ts index 9b331ccc..fb2f4157 100644 --- a/renderer-engine/services/rendering/section-renderer.ts +++ b/renderer-engine/services/rendering/section-renderer.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { logger } from '@/renderer-engine/lib/logger'; import { liquidEngine } from '@/renderer-engine/liquid/engine'; import { schemaParser } from '@/renderer-engine/services/templates/parsing/schema-parser'; diff --git a/renderer-engine/services/templates/analysis/template-analyzer.ts b/renderer-engine/services/templates/analysis/template-analyzer.ts index 2013d09e..6f125cc9 100644 --- a/renderer-engine/services/templates/analysis/template-analyzer.ts +++ b/renderer-engine/services/templates/analysis/template-analyzer.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { logger } from '@/renderer-engine/lib/logger'; import { LiquidSyntaxDetector } from '@/renderer-engine/services/templates/parsing/liquid-syntax-detector'; diff --git a/renderer-engine/services/templates/parsing/liquid-syntax-detector.ts b/renderer-engine/services/templates/parsing/liquid-syntax-detector.ts index 1965157e..6b3a252c 100644 --- a/renderer-engine/services/templates/parsing/liquid-syntax-detector.ts +++ b/renderer-engine/services/templates/parsing/liquid-syntax-detector.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import type { DataLoadOptions, DataRequirement, diff --git a/renderer-engine/services/templates/parsing/schema-parser.ts b/renderer-engine/services/templates/parsing/schema-parser.ts index c59b7992..53ae79fd 100644 --- a/renderer-engine/services/templates/parsing/schema-parser.ts +++ b/renderer-engine/services/templates/parsing/schema-parser.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + export class SchemaParser { private static readonly SCHEMA_REGEX = /{%\s*schema\s*%}([\s\S]*?){%\s*endschema\s*%}/i; diff --git a/renderer-engine/services/templates/sync/template-dev-synchronizer.ts b/renderer-engine/services/templates/sync/template-dev-synchronizer.ts index 096f87a5..7c840c0f 100644 --- a/renderer-engine/services/templates/sync/template-dev-synchronizer.ts +++ b/renderer-engine/services/templates/sync/template-dev-synchronizer.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { logger } from '@/renderer-engine/lib/logger'; import { cacheManager } from '@/renderer-engine/services/core/cache'; import { cacheInvalidationService } from '@/renderer-engine/services/core/cache/cache-invalidation-service'; diff --git a/renderer-engine/services/templates/template-loader.ts b/renderer-engine/services/templates/template-loader.ts index ed91a645..624b1182 100644 --- a/renderer-engine/services/templates/template-loader.ts +++ b/renderer-engine/services/templates/template-loader.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { liquidEngine } from '@/renderer-engine/liquid/engine'; import { cacheManager, diff --git a/renderer-engine/services/themes/core/theme-processor.ts b/renderer-engine/services/themes/core/theme-processor.ts index edb7ed58..1e78dff5 100644 --- a/renderer-engine/services/themes/core/theme-processor.ts +++ b/renderer-engine/services/themes/core/theme-processor.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { TemplateAnalysis } from '@/renderer-engine/exports'; import { RendererLogger } from '@/renderer-engine/lib/logger'; import { SchemaParser } from '@/renderer-engine/services/templates/parsing/schema-parser'; diff --git a/renderer-engine/services/themes/core/theme-validator.ts b/renderer-engine/services/themes/core/theme-validator.ts index 9080a288..641a20d0 100644 --- a/renderer-engine/services/themes/core/theme-validator.ts +++ b/renderer-engine/services/themes/core/theme-validator.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import type { ThemeFile, ValidationResult } from '../types'; import { ValidationEngine } from '../validation/validation-engine'; diff --git a/renderer-engine/services/themes/index.ts b/renderer-engine/services/themes/index.ts index d033831c..c2654e4d 100644 --- a/renderer-engine/services/themes/index.ts +++ b/renderer-engine/services/themes/index.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + // Core components export { ThemeProcessor } from './core/theme-processor'; export { ThemeValidator } from './core/theme-validator'; diff --git a/renderer-engine/services/themes/storage/s3-storage-service.ts b/renderer-engine/services/themes/storage/s3-storage-service.ts index 77c3e22f..a8b46dc3 100644 --- a/renderer-engine/services/themes/storage/s3-storage-service.ts +++ b/renderer-engine/services/themes/storage/s3-storage-service.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { RendererLogger } from '@/renderer-engine/lib/logger'; import { getCdnUrlForKey } from '@/utils/server'; import { diff --git a/renderer-engine/services/themes/types/index.ts b/renderer-engine/services/themes/types/index.ts index ff5652ae..0f8579ff 100644 --- a/renderer-engine/services/themes/types/index.ts +++ b/renderer-engine/services/themes/types/index.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + export * from './processing-types'; export * from './theme-types'; export * from './validation-types'; diff --git a/renderer-engine/services/themes/types/processing-types.ts b/renderer-engine/services/themes/types/processing-types.ts index 9324d22d..290a3dd0 100644 --- a/renderer-engine/services/themes/types/processing-types.ts +++ b/renderer-engine/services/themes/types/processing-types.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + export interface ExtractionResult { files: any[]; totalSize: number; diff --git a/renderer-engine/services/themes/types/theme-types.ts b/renderer-engine/services/themes/types/theme-types.ts index 84d14ad1..9a845c9f 100644 --- a/renderer-engine/services/themes/types/theme-types.ts +++ b/renderer-engine/services/themes/types/theme-types.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + export interface ThemeFile { path: string; content: string | Buffer; diff --git a/renderer-engine/services/themes/types/validation-types.ts b/renderer-engine/services/themes/types/validation-types.ts index 34733ee0..c740ba65 100644 --- a/renderer-engine/services/themes/types/validation-types.ts +++ b/renderer-engine/services/themes/types/validation-types.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + export interface ValidationError { type: 'structure' | 'syntax' | 'configuration' | 'security' | 'performance'; message: string; diff --git a/renderer-engine/services/themes/validation/rules/file-structure-rules.ts b/renderer-engine/services/themes/validation/rules/file-structure-rules.ts index 27e08db5..d59bf024 100644 --- a/renderer-engine/services/themes/validation/rules/file-structure-rules.ts +++ b/renderer-engine/services/themes/validation/rules/file-structure-rules.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import type { ThemeFile, ThemeValidationConfig, diff --git a/renderer-engine/services/themes/validation/rules/liquid-syntax-rules.ts b/renderer-engine/services/themes/validation/rules/liquid-syntax-rules.ts index acf4116e..a2e804a4 100644 --- a/renderer-engine/services/themes/validation/rules/liquid-syntax-rules.ts +++ b/renderer-engine/services/themes/validation/rules/liquid-syntax-rules.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { LiquidEngine } from '@/renderer-engine/liquid/engine'; import type { ThemeFile, diff --git a/renderer-engine/services/themes/validation/rules/performance-rules.ts b/renderer-engine/services/themes/validation/rules/performance-rules.ts index 42459b01..f22d17dd 100644 --- a/renderer-engine/services/themes/validation/rules/performance-rules.ts +++ b/renderer-engine/services/themes/validation/rules/performance-rules.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import type { ThemeFile, ThemeValidationConfig, diff --git a/renderer-engine/services/themes/validation/rules/security-rules.ts b/renderer-engine/services/themes/validation/rules/security-rules.ts index 681bca49..701c6334 100644 --- a/renderer-engine/services/themes/validation/rules/security-rules.ts +++ b/renderer-engine/services/themes/validation/rules/security-rules.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import type { ThemeFile, ThemeValidationConfig, diff --git a/renderer-engine/services/themes/validation/utils/file-filters.ts b/renderer-engine/services/themes/validation/utils/file-filters.ts index 8182283a..6a0b9c63 100644 --- a/renderer-engine/services/themes/validation/utils/file-filters.ts +++ b/renderer-engine/services/themes/validation/utils/file-filters.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import type { ThemeFile } from '../../types'; /** diff --git a/renderer-engine/services/themes/validation/validation-engine.ts b/renderer-engine/services/themes/validation/validation-engine.ts index 3bb50ccd..910da5f6 100644 --- a/renderer-engine/services/themes/validation/validation-engine.ts +++ b/renderer-engine/services/themes/validation/validation-engine.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { RendererLogger } from '@/renderer-engine/lib/logger'; import type { ThemeFile, ThemeValidationConfig, ValidationResult } from '../types'; import { FileStructureRules } from './rules/file-structure-rules'; diff --git a/renderer-engine/types/cart.ts b/renderer-engine/types/cart.ts index 610f7de6..27e37d6a 100644 --- a/renderer-engine/types/cart.ts +++ b/renderer-engine/types/cart.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import type { Schema } from '@/amplify/data/resource'; export type Cart = Omit & { diff --git a/renderer-engine/types/checkout.ts b/renderer-engine/types/checkout.ts index 9b9dbdb1..d81b560d 100644 --- a/renderer-engine/types/checkout.ts +++ b/renderer-engine/types/checkout.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + export interface CustomerInfo { email?: string; firstName?: string; diff --git a/renderer-engine/types/index.ts b/renderer-engine/types/index.ts index db150cae..cde82618 100644 --- a/renderer-engine/types/index.ts +++ b/renderer-engine/types/index.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + // Store types export type { DomainResolution, Store, StoreConfig, StoreTemplate, TemplateFiles } from '@/renderer-engine/types/store'; diff --git a/renderer-engine/types/liquid.ts b/renderer-engine/types/liquid.ts index c0dc9df3..454415b9 100644 --- a/renderer-engine/types/liquid.ts +++ b/renderer-engine/types/liquid.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { FS, Liquid } from 'liquidjs'; export interface LiquidEngineConfig { diff --git a/renderer-engine/types/page.ts b/renderer-engine/types/page.ts index 907dc293..e4a745ac 100644 --- a/renderer-engine/types/page.ts +++ b/renderer-engine/types/page.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + export interface Page { id: string; storeId: string; diff --git a/renderer-engine/types/product.ts b/renderer-engine/types/product.ts index 33f54b56..52104ead 100644 --- a/renderer-engine/types/product.ts +++ b/renderer-engine/types/product.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + export interface Product { id: string; storeId: string; diff --git a/renderer-engine/types/store.ts b/renderer-engine/types/store.ts index 416c27a6..1bc67052 100644 --- a/renderer-engine/types/store.ts +++ b/renderer-engine/types/store.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + export interface Store { storeId: string; userId: string; diff --git a/renderer-engine/types/template.ts b/renderer-engine/types/template.ts index f0a2f48d..a2fd6619 100644 --- a/renderer-engine/types/template.ts +++ b/renderer-engine/types/template.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import type { AssetCollector } from '@/renderer-engine/services/rendering/asset-collector'; export interface TemplateFile { diff --git a/scripts/add-license-header.js b/scripts/add-license-header.js new file mode 100644 index 00000000..803d1b23 --- /dev/null +++ b/scripts/add-license-header.js @@ -0,0 +1,171 @@ +#!/usr/bin/env node + +const fs = require('fs'); +const path = require('path'); +const glob = require('glob'); + +// Header de licencia Apache 2.0 +const LICENSE_HEADER = `/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */`; + +// Patrones de archivos a incluir +const FILE_PATTERNS = ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx']; + +// Directorios y archivos a excluir +const EXCLUDE_PATTERNS = [ + 'node_modules/**', + 'dist/**', + 'build/**', + '.next/**', + 'coverage/**', + '**/*.d.ts', + '**/next-env.d.ts', + 'amplify_outputs.json', + 'package*.json', + 'tsconfig*.json', + 'jest.config.js', + 'jest.setup.js', + 'next.config.ts', + 'tailwind.config.ts', + 'postcss.config.mjs', +]; + +// Función para verificar si el archivo ya tiene un header de licencia +function hasLicenseHeader(content) { + return ( + content.includes('Copyright 2025 Fasttify LLC') || + content.includes('Licensed under the Apache License') || + content.includes('http://www.apache.org/licenses/LICENSE-2.0') || + (content.trim().startsWith('/*') && content.includes('license')) + ); +} + +// Función para agregar header a un archivo +function addHeaderToFile(filePath) { + try { + const content = fs.readFileSync(filePath, 'utf8'); + + // Si ya tiene header, saltar + if (hasLicenseHeader(content)) { + console.log(`⏭️ Saltando ${filePath} (ya tiene header de licencia)`); + return false; + } + + // Agregar header al inicio del archivo + const newContent = LICENSE_HEADER + '\n\n' + content; + fs.writeFileSync(filePath, newContent, 'utf8'); + + console.log(`✅ Header agregado a ${filePath}`); + return true; + } catch (error) { + console.error(`❌ Error procesando ${filePath}:`, error.message); + return false; + } +} + +// Función principal +async function main() { + const args = process.argv.slice(2); + const dryRun = args.includes('--dry-run') || args.includes('-d'); + const specificPath = args.find((arg) => !arg.startsWith('--')); + + console.log('🔍 Buscando archivos para agregar header de licencia...\n'); + + let files = []; + + if (specificPath) { + // Si se especifica un archivo o directorio específico + if (fs.statSync(specificPath).isFile()) { + files = [specificPath]; + } else { + // Buscar archivos en el directorio específico + // Normalizar la ruta del directorio + const normalizedPath = specificPath.replace(/\\/g, '/').replace(/\/$/, ''); + + for (const pattern of FILE_PATTERNS) { + const searchPattern = `${normalizedPath}/${pattern}`; + const found = glob.sync(searchPattern, { + ignore: EXCLUDE_PATTERNS.map((exclude) => { + if (exclude.startsWith('**/')) { + return exclude; + } + return `${normalizedPath}/${exclude}`; + }), + }); + files.push(...found); + } + } + } else { + // Buscar en todo el proyecto + for (const pattern of FILE_PATTERNS) { + const found = glob.sync(pattern, { ignore: EXCLUDE_PATTERNS }); + files.push(...found); + } + } + + // Remover duplicados y ordenar + files = [...new Set(files)].sort(); + + console.log(`📁 Encontrados ${files.length} archivos candidatos\n`); + + if (dryRun) { + console.log('🔍 MODO DRY-RUN - Solo mostrando archivos que serían modificados:\n'); + files.forEach((file) => { + const content = fs.readFileSync(file, 'utf8'); + if (!hasLicenseHeader(content)) { + console.log(` 📝 ${file}`); + } + }); + return; + } + + let processedCount = 0; + let skippedCount = 0; + + for (const file of files) { + if (addHeaderToFile(file)) { + processedCount++; + } else { + skippedCount++; + } + } + + console.log(`\n📊 Resumen:`); + console.log(` ✅ Archivos procesados: ${processedCount}`); + console.log(` ⏭️ Archivos saltados: ${skippedCount}`); + console.log(` 📁 Total de archivos: ${files.length}`); +} + +// Mostrar ayuda +if (process.argv.includes('--help') || process.argv.includes('-h')) { + console.log(` +Uso: node scripts/add-license-header.js [opciones] [ruta] + +Opciones: + --dry-run, -d Solo mostrar archivos que serían modificados + --help, -h Mostrar esta ayuda + +Ejemplos: + node scripts/add-license-header.js # Procesar todo el proyecto + node scripts/add-license-header.js --dry-run # Ver archivos candidatos + node scripts/add-license-header.js renderer-engine/ # Solo directorio específico + node scripts/add-license-header.js app/page.tsx # Solo archivo específico +`); + process.exit(0); +} + +// Ejecutar +main().catch(console.error); diff --git a/tenant-domains/config/security-config.ts b/tenant-domains/config/security-config.ts index 141ad0b8..4515336f 100644 --- a/tenant-domains/config/security-config.ts +++ b/tenant-domains/config/security-config.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + /** * Configuración de seguridad centralizada para validación de dominios */ diff --git a/tenant-domains/index.ts b/tenant-domains/index.ts index cea99988..4ee95d9c 100644 --- a/tenant-domains/index.ts +++ b/tenant-domains/index.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + export { DNSVerifier } from '@/tenant-domains/services/cloudfront/dns-verifier'; export { CloudFrontTenantManager } from '@/tenant-domains/services/cloudfront/tenant-manager'; export { DNSHTTPVerifier } from '@/tenant-domains/services/domain/dns-http-verifier'; diff --git a/tenant-domains/services/cloudfront/dns-verifier.ts b/tenant-domains/services/cloudfront/dns-verifier.ts index fe60e09d..0e9a4bc9 100644 --- a/tenant-domains/services/cloudfront/dns-verifier.ts +++ b/tenant-domains/services/cloudfront/dns-verifier.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + export interface DNSStatus { isConfigured: boolean; hasError: boolean; diff --git a/tenant-domains/services/cloudfront/tenant-manager.ts b/tenant-domains/services/cloudfront/tenant-manager.ts index 1fcb2e6a..526c8689 100644 --- a/tenant-domains/services/cloudfront/tenant-manager.ts +++ b/tenant-domains/services/cloudfront/tenant-manager.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { CloudFrontClient, CreateDistributionTenantCommand, diff --git a/tenant-domains/services/custom-domain-service.ts b/tenant-domains/services/custom-domain-service.ts index 1bcf7bad..14147fc0 100644 --- a/tenant-domains/services/custom-domain-service.ts +++ b/tenant-domains/services/custom-domain-service.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { CertificateManager } from '@/tenant-domains/services/ssl/certificate-manager'; import { DomainValidator, DomainValidationResult } from '@/tenant-domains/services/domain/domain-validator'; import { diff --git a/tenant-domains/services/domain/dns-http-verifier.ts b/tenant-domains/services/domain/dns-http-verifier.ts index 3d6babf2..a1b0d53a 100644 --- a/tenant-domains/services/domain/dns-http-verifier.ts +++ b/tenant-domains/services/domain/dns-http-verifier.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { SecureLogger } from '@/lib/utils/secure-logger'; import { SecurityConfig } from '@/tenant-domains/config/security-config'; diff --git a/tenant-domains/services/domain/domain-validator.ts b/tenant-domains/services/domain/domain-validator.ts index 069a0fda..b2e8b7f1 100644 --- a/tenant-domains/services/domain/domain-validator.ts +++ b/tenant-domains/services/domain/domain-validator.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { TokenGenerator, TokenGenerationResult } from '@/tenant-domains/services/domain/token-generator'; import { DNSHTTPVerifier } from '@/tenant-domains/services/domain/dns-http-verifier'; import { SecurityConfig } from '@/tenant-domains/config/security-config'; diff --git a/tenant-domains/services/domain/token-generator.ts b/tenant-domains/services/domain/token-generator.ts index b415ed77..b722310a 100644 --- a/tenant-domains/services/domain/token-generator.ts +++ b/tenant-domains/services/domain/token-generator.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + export interface ValidationToken { token: string; expiresAt: number; diff --git a/tenant-domains/services/ssl/certificate-manager.ts b/tenant-domains/services/ssl/certificate-manager.ts index 39cb7d88..17c9a20b 100644 --- a/tenant-domains/services/ssl/certificate-manager.ts +++ b/tenant-domains/services/ssl/certificate-manager.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { SecureLogger } from '@/lib/utils/secure-logger'; import { ACMClient, diff --git a/utils/server/AmplifyServer.ts b/utils/server/AmplifyServer.ts index de3e1a7e..9f3112cf 100644 --- a/utils/server/AmplifyServer.ts +++ b/utils/server/AmplifyServer.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { cookies } from 'next/headers'; import { createServerRunner } from '@aws-amplify/adapter-nextjs'; import { generateServerClientUsingCookies } from '@aws-amplify/adapter-nextjs/api'; diff --git a/utils/server/amplifyServerUtils.ts b/utils/server/amplifyServerUtils.ts index 59f2a732..7218ffd6 100644 --- a/utils/server/amplifyServerUtils.ts +++ b/utils/server/amplifyServerUtils.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { createServerRunner } from '@aws-amplify/adapter-nextjs'; import outputs from '@/amplify_outputs.json'; diff --git a/utils/server/cdn-url.ts b/utils/server/cdn-url.ts index 4fd7d072..7379d493 100644 --- a/utils/server/cdn-url.ts +++ b/utils/server/cdn-url.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + /** * Utilidades para construir URLs de CDN o S3 * Reglas: diff --git a/utils/server/index.ts b/utils/server/index.ts index 2892aeac..4b0567e2 100644 --- a/utils/server/index.ts +++ b/utils/server/index.ts @@ -1 +1,17 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + export { getCdnBaseUrl, getCdnUrlForKey } from './cdn-url'; From 9549fce907a524694ce0387cf926ab588155fc96 Mon Sep 17 00:00:00 2001 From: Steven Date: Tue, 19 Aug 2025 11:14:08 -0500 Subject: [PATCH 2/4] refactor(services): Remove unnecessary comments and adjust import paths - Comments describing the creation of collections and menus in `collectionService.ts` and `menuService.ts` have been removed to improve code clarity. - Import paths in several files within `renderer-engine` and `tenant-domains` have been configured to use relative paths, improving code organization. --- .../services/collectionService.ts | 1 - .../services/menuService.ts | 2 -- renderer-engine/exports.ts | 34 +++++++++---------- renderer-engine/index.ts | 2 +- tenant-domains/index.ts | 14 ++++---- 5 files changed, 25 insertions(+), 28 deletions(-) diff --git a/amplify/functions/createStoreTemplate/services/collectionService.ts b/amplify/functions/createStoreTemplate/services/collectionService.ts index a0e1b26b..14525819 100644 --- a/amplify/functions/createStoreTemplate/services/collectionService.ts +++ b/amplify/functions/createStoreTemplate/services/collectionService.ts @@ -11,7 +11,6 @@ export const createDefaultCollections = async ( try { const createdCollectionIds: string[] = []; - // Crear todas las colecciones definidas en defaultCollections for (const collectionConfig of defaultCollections as DefaultCollection[]) { try { const collection = await client.models.Collection.create({ diff --git a/amplify/functions/createStoreTemplate/services/menuService.ts b/amplify/functions/createStoreTemplate/services/menuService.ts index c5af8110..112d6e61 100644 --- a/amplify/functions/createStoreTemplate/services/menuService.ts +++ b/amplify/functions/createStoreTemplate/services/menuService.ts @@ -12,10 +12,8 @@ export const createDefaultMenus = async ( try { const createdMenuIds: string[] = []; - // Crear todos los menús definidos en defaultMenus for (const menuConfig of defaultMenus as DefaultNavigationMenu[]) { try { - // Crear el menú con toda la estructura JSON const menuResult = await client.models.NavigationMenu.create({ storeId: storeId, domain: domain, diff --git a/renderer-engine/exports.ts b/renderer-engine/exports.ts index ae4f78d4..49690f25 100644 --- a/renderer-engine/exports.ts +++ b/renderer-engine/exports.ts @@ -15,44 +15,44 @@ */ // ===== FACTORY PRINCIPAL ===== -export { StoreRendererFactory } from '@/renderer-engine/factories/store-renderer-factory'; -export { storeRenderer } from '@/renderer-engine/instances'; +export { StoreRendererFactory } from './factories/store-renderer-factory'; +export { storeRenderer } from './instances'; // ===== RENDERERS ===== -export { DynamicPageRenderer } from '@/renderer-engine/renderers/dynamic-page-renderer'; +export { DynamicPageRenderer } from './renderers/dynamic-page-renderer'; // ===== LIQUID ENGINE ===== -export { liquidEngine } from '@/renderer-engine/liquid/engine'; +export { liquidEngine } from './liquid/engine'; // ===== SERVICIOS CORE ===== -export { domainResolver } from '@/renderer-engine/services/core/domain-resolver'; -export { linkListService } from '@/renderer-engine/services/core/navigation-service'; +export { domainResolver } from './services/core/domain-resolver'; +export { linkListService } from './services/core/navigation-service'; // ===== SERVICIOS DE ERRORES ===== -export { errorRenderer } from '@/renderer-engine/services/errors/error-renderer'; +export { errorRenderer } from './services/errors/error-renderer'; // ===== SERVICIOS DE DATOS ===== -export { dataFetcher } from '@/renderer-engine/services/fetchers/data-fetcher'; -export { navigationFetcher } from '@/renderer-engine/services/fetchers/navigation-fetcher'; +export { dataFetcher } from './services/fetchers/data-fetcher'; +export { navigationFetcher } from './services/fetchers/navigation-fetcher'; // ===== SERVICIOS DE PLANTILLAS ===== -export { templateAnalyzer } from '@/renderer-engine/services/templates/analysis/template-analyzer'; -export { templateLoader } from '@/renderer-engine/services/templates/template-loader'; +export { templateAnalyzer } from './services/templates/analysis/template-analyzer'; +export { templateLoader } from './services/templates/template-loader'; // ===== SERVICIOS DINÁMICOS ===== -export { dynamicDataLoader } from '@/renderer-engine/services/page/dynamic-data-loader'; +export { dynamicDataLoader } from './services/page/dynamic-data-loader'; // ===== CONFIGURACIÓN ===== -export { pathToRenderOptions, routeMatchers } from '@/renderer-engine/config/route-matchers'; -export type { RouteMatcher } from '@/renderer-engine/config/route-matchers'; +export { pathToRenderOptions, routeMatchers } from './config/route-matchers'; +export type { RouteMatcher } from './config/route-matchers'; // ===== TIPOS PRINCIPALES ===== -export type { RenderResult } from '@/renderer-engine/types'; +export type { RenderResult } from './types'; // ===== TIPOS DEL SISTEMA DINÁMICO ===== -export type { DynamicLoadResult } from '@/renderer-engine/services/page/dynamic-data-loader'; +export type { DynamicLoadResult } from './services/page/dynamic-data-loader'; export type { DataLoadOptions, DataRequirement, TemplateAnalysis, -} from '@/renderer-engine/services/templates/analysis/template-analyzer'; +} from './services/templates/analysis/template-analyzer'; diff --git a/renderer-engine/index.ts b/renderer-engine/index.ts index dc73d323..91ea23b1 100644 --- a/renderer-engine/index.ts +++ b/renderer-engine/index.ts @@ -29,4 +29,4 @@ */ // Re-exportar todo desde el archivo de exports organizado -export * from '@/renderer-engine/exports'; +export * from './exports'; diff --git a/tenant-domains/index.ts b/tenant-domains/index.ts index 4ee95d9c..43fbfdf0 100644 --- a/tenant-domains/index.ts +++ b/tenant-domains/index.ts @@ -14,10 +14,10 @@ * limitations under the License. */ -export { DNSVerifier } from '@/tenant-domains/services/cloudfront/dns-verifier'; -export { CloudFrontTenantManager } from '@/tenant-domains/services/cloudfront/tenant-manager'; -export { DNSHTTPVerifier } from '@/tenant-domains/services/domain/dns-http-verifier'; -export { DomainValidator } from '@/tenant-domains/services/domain/domain-validator'; -export { TokenGenerator } from '@/tenant-domains/services/domain/token-generator'; -export { CertificateManager } from '@/tenant-domains/services/ssl/certificate-manager'; -export { CustomDomainService } from '@/tenant-domains/services/custom-domain-service'; +export { DNSVerifier } from './services/cloudfront/dns-verifier'; +export { CloudFrontTenantManager } from './services/cloudfront/tenant-manager'; +export { DNSHTTPVerifier } from './services/domain/dns-http-verifier'; +export { DomainValidator } from './services/domain/domain-validator'; +export { TokenGenerator } from './services/domain/token-generator'; +export { CertificateManager } from './services/ssl/certificate-manager'; +export { CustomDomainService } from './services/custom-domain-service'; From 90e9cdf3ffbcff472a0231ae4f5cfa201b1d10f6 Mon Sep 17 00:00:00 2001 From: Steven Date: Tue, 19 Aug 2025 11:29:44 -0500 Subject: [PATCH 3/4] refactor(load-data): Remove logger logs and adjust import paths - Removed unnecessary logger logs in the `loadDataStep` function to improve code clarity. - Configured import paths in `index.ts` to use relative paths, improving code organization. --- .../pipeline-steps/load-data-step.ts | 13 ----------- renderer-engine/types/index.ts | 22 ++++++------------- 2 files changed, 7 insertions(+), 28 deletions(-) diff --git a/renderer-engine/renderers/pipeline-steps/load-data-step.ts b/renderer-engine/renderers/pipeline-steps/load-data-step.ts index 19548881..1f04b1b4 100644 --- a/renderer-engine/renderers/pipeline-steps/load-data-step.ts +++ b/renderer-engine/renderers/pipeline-steps/load-data-step.ts @@ -25,8 +25,6 @@ import { templateLoader } from '@/renderer-engine/services/templates/template-lo * Paso 4: Cargar todos los datos en paralelo */ export async function loadDataStep(data: RenderingData): Promise { - logger.info(`Using dynamic data loading for ${data.options.pageType}`, 'DynamicPageRenderer'); - const templatePath = pageConfig.getTemplatePath(data.options.pageType); const isJsonTemplate = templatePath.endsWith('.json'); @@ -67,17 +65,6 @@ export async function loadDataStep(data: RenderingData): Promise loadedTemplates ); - logger.debug( - `Dynamic analysis results for ${data.options.pageType}:`, - { - requiredData: Array.from(pageData.analysis.requiredData.keys()), - liquidObjects: pageData.analysis.liquidObjects, - dependencies: pageData.analysis.dependencies.length, - searchProductsCount: pageData.searchProducts?.length, - }, - 'DynamicPageRenderer' - ); - return { ...data, layout, diff --git a/renderer-engine/types/index.ts b/renderer-engine/types/index.ts index cde82618..d2bfdf02 100644 --- a/renderer-engine/types/index.ts +++ b/renderer-engine/types/index.ts @@ -15,7 +15,7 @@ */ // Store types -export type { DomainResolution, Store, StoreConfig, StoreTemplate, TemplateFiles } from '@/renderer-engine/types/store'; +export type { DomainResolution, Store, StoreConfig, StoreTemplate, TemplateFiles } from './store'; // Product types export type { @@ -28,10 +28,10 @@ export type { Product, ProductImage, ProductVariant, -} from '@/renderer-engine/types/product'; +} from './product'; // Page types -export type { Page } from '@/renderer-engine/types/page'; +export type { Page } from './page'; // Template types export type { @@ -51,7 +51,7 @@ export type { TemplateError, TemplateFile, TwitterCardData, -} from '@/renderer-engine/types/template'; +} from './template'; // Liquid types export type { @@ -72,18 +72,10 @@ export type { SectionTag, StyleTag, UrlFilter, -} from '@/renderer-engine/types/liquid'; +} from './liquid'; // Cart types -export type { - AddToCartRequest, - Cart, - CartContext, - CartItem, - CartRaw, - CartResponse, - UpdateCartRequest, -} from '@/renderer-engine/types/cart'; +export type { AddToCartRequest, Cart, CartContext, CartItem, CartRaw, CartResponse, UpdateCartRequest } from './cart'; // Checkout types export type { @@ -96,4 +88,4 @@ export type { CustomerInfo, StartCheckoutRequest, UpdateCustomerInfoRequest, -} from '@/renderer-engine/types/checkout'; +} from './checkout'; From 050dd2ca36f9f6eade01e047f112fcf3166f1e47 Mon Sep 17 00:00:00 2001 From: Steven Date: Tue, 19 Aug 2025 11:46:21 -0500 Subject: [PATCH 4/4] refactor(profile): Simplify the construction of public URLs for images - Manual construction of public URLs in the `useUpdateProfilePicture`, `useLogoUpload`, and `useProductImageUpload` hooks has been replaced with a CDN utility, improving code clarity and reusability. - Environment variable dependencies related to S3 and CloudFront have been removed, simplifying the URL retrieval logic. --- .../hooks/useUpdateProfilePicture.ts | 23 ++-------- app/store/hooks/storage/useLogoUpload.ts | 37 +++------------- .../hooks/storage/useProductImageUpload.ts | 36 +++------------- utils/client/AmplifyUtils.ts | 15 +++++++ utils/client/cdn-url.ts | 43 +++++++++++++++++++ utils/client/index.ts | 17 ++++++++ utils/client/routes.ts | 15 +++++++ utils/client/store-utils.ts | 15 +++++++ 8 files changed, 121 insertions(+), 80 deletions(-) create mode 100644 utils/client/cdn-url.ts create mode 100644 utils/client/index.ts diff --git a/app/(main-layout)/account-settings/hooks/useUpdateProfilePicture.ts b/app/(main-layout)/account-settings/hooks/useUpdateProfilePicture.ts index 4c358582..edfc4685 100644 --- a/app/(main-layout)/account-settings/hooks/useUpdateProfilePicture.ts +++ b/app/(main-layout)/account-settings/hooks/useUpdateProfilePicture.ts @@ -1,4 +1,5 @@ import { useAuthUser } from '@/hooks/auth/useAuthUser'; +import { getCdnUrlForKey } from '@/utils/client'; import { updateUserAttributes } from 'aws-amplify/auth'; import { uploadData } from 'aws-amplify/storage'; import { useState } from 'react'; @@ -26,26 +27,8 @@ export function useUpdateProfilePicture() { }, }).result; - // 2. Construir la URL pública condicionalmente. - const bucketName = process.env.NEXT_PUBLIC_S3_URL; - const awsRegion = process.env.NEXT_PUBLIC_AWS_REGION; - const cloudFrontDomain = process.env.NEXT_PUBLIC_CLOUDFRONT_DOMAIN; - - if (!bucketName) { - throw new Error('NEXT_PUBLIC_S3_URL is not defined in your environment variables'); - } - - let publicUrl: string; - const s3Key = result.path; - - if (cloudFrontDomain && cloudFrontDomain.trim() !== '') { - // Usar CloudFront para producción (o cuando esté configurado) - publicUrl = `https://${cloudFrontDomain}/${s3Key}`; - } else { - // Fallback a la URL de S3 para otros entornos - const regionForS3Url = awsRegion; - publicUrl = `https://${bucketName}.s3.${regionForS3Url}.amazonaws.com/${s3Key}`; - } + // 2. Construir la URL pública usando la utilidad de CDN. + const publicUrl = getCdnUrlForKey(result.path); // 3. Actualizar el atributo 'picture' del usuario con la URL pública. await updateUserAttributes({ diff --git a/app/store/hooks/storage/useLogoUpload.ts b/app/store/hooks/storage/useLogoUpload.ts index d5887ac8..e776435b 100644 --- a/app/store/hooks/storage/useLogoUpload.ts +++ b/app/store/hooks/storage/useLogoUpload.ts @@ -1,9 +1,10 @@ -import { useState } from 'react'; -import { uploadData } from 'aws-amplify/storage'; -import { getCurrentUser } from 'aws-amplify/auth'; +import outputs from '@/amplify_outputs.json'; +import { getCdnUrlForKey } from '@/utils/client'; import { Amplify } from 'aws-amplify'; +import { getCurrentUser } from 'aws-amplify/auth'; +import { uploadData } from 'aws-amplify/storage'; +import { useState } from 'react'; import { v4 as uuidv4 } from 'uuid'; -import outputs from '@/amplify_outputs.json'; Amplify.configure(outputs); @@ -26,21 +27,6 @@ export function useLogoUpload(): UseLogoUploadReturn { const [status, setStatus] = useState('idle'); const [error, setError] = useState(null); - // Obtener el bucket y la región desde las variables de entorno - const bucketName = process.env.NEXT_PUBLIC_S3_URL; - const awsRegion = process.env.NEXT_PUBLIC_AWS_REGION; - const cloudFrontDomain = process.env.NEXT_PUBLIC_CLOUDFRONT_DOMAIN; - - if (!bucketName) { - throw new Error('environment variable NEXT_PUBLIC_S3_URL is not defined'); - } - - if (!awsRegion && (!cloudFrontDomain || cloudFrontDomain.trim() === '')) { - throw new Error( - 'environment variable NEXT_PUBLIC_AWS_REGION is not defined or NEXT_PUBLIC_CLOUDFRONT_DOMAIN is not defined or empty' - ); - } - const reset = () => { setStatus('idle'); setError(null); @@ -69,17 +55,8 @@ export function useLogoUpload(): UseLogoUploadReturn { }, }).result; - // Construir la URL pública condicionalmente - let publicUrl: string; - const s3Key = result.path; - - if (cloudFrontDomain && cloudFrontDomain.trim() !== '') { - publicUrl = `https://${cloudFrontDomain}/${s3Key}`; - } else { - // Fallback a la URL de S3 - const regionForS3Url = awsRegion; - publicUrl = `https://${bucketName}.s3.${regionForS3Url}.amazonaws.com/${s3Key}`; - } + // Construir la URL pública usando la utilidad CDN + const publicUrl = getCdnUrlForKey(result.path); setStatus('success'); diff --git a/app/store/hooks/storage/useProductImageUpload.ts b/app/store/hooks/storage/useProductImageUpload.ts index c6ef752f..9df35fbd 100644 --- a/app/store/hooks/storage/useProductImageUpload.ts +++ b/app/store/hooks/storage/useProductImageUpload.ts @@ -1,8 +1,9 @@ -import { useState } from 'react'; -import { uploadData } from 'aws-amplify/storage'; +import outputs from '@/amplify_outputs.json'; +import { getCdnUrlForKey } from '@/utils/client'; import { Amplify } from 'aws-amplify'; +import { uploadData } from 'aws-amplify/storage'; +import { useState } from 'react'; import { v4 as uuidv4 } from 'uuid'; -import outputs from '@/amplify_outputs.json'; Amplify.configure(outputs); @@ -15,21 +16,6 @@ export function useProductImageUpload() { const [isLoading, setIsLoading] = useState(false); const [error, setError] = useState(null); - // Obtener el bucket, la región y el dominio del CDN desde las variables de entorno - const bucketName = process.env.NEXT_PUBLIC_S3_URL; - const awsRegion = process.env.NEXT_PUBLIC_AWS_REGION; - const cloudFrontDomain = process.env.NEXT_PUBLIC_CLOUDFRONT_DOMAIN; - - if (!bucketName) { - throw new Error('environment variable NEXT_PUBLIC_S3_URL is not defined'); - } - // Es bueno tener awsRegion si se usa el fallback a S3 - if (!awsRegion && (!cloudFrontDomain || cloudFrontDomain.trim() === '')) { - throw new Error( - 'environment variable NEXT_PUBLIC_AWS_REGION is not defined or NEXT_PUBLIC_CLOUDFRONT_DOMAIN is not defined or empty' - ); - } - const uploadProductImage = async (file: File, storeId: string): Promise => { setIsLoading(true); setError(null); @@ -48,18 +34,8 @@ export function useProductImageUpload() { data: file, }).result; - // Construir la URL pública condicionalmente - let publicUrl: string; - const s3Key = result.path; - - if (cloudFrontDomain && cloudFrontDomain.trim() !== '') { - // Usar CloudFront (generalmente para producción o cuando esté configurado) - publicUrl = `https://${cloudFrontDomain}/${s3Key}`; - } else { - // Fallback a la URL de S3 - const regionForS3Url = awsRegion; - publicUrl = `https://${bucketName}.s3.${regionForS3Url}.amazonaws.com/${s3Key}`; - } + // Construir la URL pública usando la utilidad de CDN + const publicUrl = getCdnUrlForKey(result.path); return { url: publicUrl, diff --git a/utils/client/AmplifyUtils.ts b/utils/client/AmplifyUtils.ts index a93419f8..263d1712 100644 --- a/utils/client/AmplifyUtils.ts +++ b/utils/client/AmplifyUtils.ts @@ -1,3 +1,18 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ import { cookies } from 'next/headers'; import { createServerRunner } from '@aws-amplify/adapter-nextjs'; import { generateServerClientUsingCookies } from '@aws-amplify/adapter-nextjs/api'; diff --git a/utils/client/cdn-url.ts b/utils/client/cdn-url.ts new file mode 100644 index 00000000..a1838756 --- /dev/null +++ b/utils/client/cdn-url.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Utilidades para construir URLs de CDN o S3 en el frontend + * Reglas: + * - Si NEXT_PUBLIC_CLOUDFRONT_DOMAIN está configurado: usar CloudFront + * - Si no: usar bucket público de S3 con NEXT_PUBLIC_S3_URL y NEXT_PUBLIC_AWS_REGION + */ + +export function getCdnBaseUrl(): string { + const cloudFrontDomain = process.env.NEXT_PUBLIC_CLOUDFRONT_DOMAIN; + + if (cloudFrontDomain && cloudFrontDomain.trim() !== '') { + return `https://${cloudFrontDomain}`; + } + + const bucketName = process.env.NEXT_PUBLIC_S3_URL; + const region = process.env.NEXT_PUBLIC_AWS_REGION || 'us-east-2'; + + if (!bucketName) { + throw new Error('NEXT_PUBLIC_S3_URL is not defined in your environment variables'); + } + + return `https://${bucketName}.s3.${region}.amazonaws.com`; +} + +export function getCdnUrlForKey(s3Key: string): string { + return `${getCdnBaseUrl()}/${s3Key}`; +} diff --git a/utils/client/index.ts b/utils/client/index.ts new file mode 100644 index 00000000..4b0567e2 --- /dev/null +++ b/utils/client/index.ts @@ -0,0 +1,17 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export { getCdnBaseUrl, getCdnUrlForKey } from './cdn-url'; diff --git a/utils/client/routes.ts b/utils/client/routes.ts index 2a4fd409..aa9f7e6e 100644 --- a/utils/client/routes.ts +++ b/utils/client/routes.ts @@ -1,3 +1,18 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ export const routes = { store: { dashboard: { diff --git a/utils/client/store-utils.ts b/utils/client/store-utils.ts index ffca1d56..89db1127 100644 --- a/utils/client/store-utils.ts +++ b/utils/client/store-utils.ts @@ -1,3 +1,18 @@ +/* + * Copyright 2025 Fasttify LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ /** * Funciones de utilidad para operaciones relacionadas con tiendas */